[cairo-commit] cairo/test cairo-test-beos.cpp,1.1,1.2

Christian Biesinger commit at pdx.freedesktop.org
Mon Dec 26 16:44:43 PST 2005


Committed by: biesi

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv7997/test

Modified Files:
	cairo-test-beos.cpp 
Log Message:
2005-12-26  Christian Biesinger  <cbiesinger at web.de>

	* src/cairo-beos-surface.cpp: Don't require that the caller locks
	the view; do it in cairo code.
	* test/cairo-test-beos.cpp: Remove the now-unneeded locking


Index: cairo-test-beos.cpp
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test-beos.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cairo-test-beos.cpp	19 Dec 2005 01:20:07 -0000	1.1
+++ cairo-test-beos.cpp	27 Dec 2005 00:44:41 -0000	1.2
@@ -70,6 +70,13 @@
     mView = new BView(frame, "CairoWindowTestView", B_FOLLOW_ALL_SIDES, 0);
     AddChild(mView);
     Show();
+
+    // Make sure the window is actually on screen
+    Lock();
+    Sync();
+    mView->SetViewColor(B_TRANSPARENT_COLOR);
+    mView->Sync();
+    Unlock();
 }
 
 CairoTestWindow::~CairoTestWindow()
@@ -169,10 +176,6 @@
     float bottom = test->height ? test->height - 1 : 0;
     BRect rect(0.0, 0.0, right, bottom);
     CairoTestWindow* wnd = new CairoTestWindow(rect, test->name);
-    if (!wnd->View()->LockLooper()) {
-	cairo_test_log("Error locking looper\n");
-	return NULL;
-    }
 
     beos_test_closure* bclosure = new beos_test_closure;
     bclosure->view = wnd->View();
@@ -189,6 +192,7 @@
 {
     beos_test_closure* bclosure = reinterpret_cast<beos_test_closure*>(closure);
 
+    bclosure->window->Lock();
     bclosure->window->Quit();
 
     delete bclosure;
@@ -206,11 +210,6 @@
     BView* view = new BView(rect, "Cairo test view", B_FOLLOW_ALL_SIDES, 0);
     bmp->AddChild(view);
 
-    if (!view->LockLooper()) {
-	cairo_test_log("Error locking looper\n");
-	return NULL;
-    }
-
     beos_test_closure* bclosure = new beos_test_closure;
     bclosure->view = view;
     bclosure->bitmap = bmp;
@@ -225,8 +224,6 @@
 {
     beos_test_closure* bclosure = reinterpret_cast<beos_test_closure*>(closure);
 
-    bclosure->view->UnlockLooper();
-
     bclosure->bitmap->RemoveChild(bclosure->view);
 
 



More information about the cairo-commit mailing list