[cairo-commit] CairoJava/test/org/cairographics/cairo/test TestCairoImage.java, 1.5, 1.6

Soorya Kuloor commit at pdx.freedesktop.org
Thu Jun 3 15:27:05 PDT 2004


Committed by: skuloor

Update of /cvs/cairo/CairoJava/test/org/cairographics/cairo/test
In directory pdx:/tmp/cvs-serv31268/test/org/cairographics/cairo/test

Modified Files:
	TestCairoImage.java 
Log Message:
Turn off double buffering for SWT window that is painted using glitz surface

Index: TestCairoImage.java
===================================================================
RCS file: /cvs/cairo/CairoJava/test/org/cairographics/cairo/test/TestCairoImage.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** a/TestCairoImage.java	20 May 2004 19:36:38 -0000	1.5
--- b/TestCairoImage.java	3 Jun 2004 22:27:03 -0000	1.6
***************
*** 37,41 ****
  import org.cairographics.cairo.CairoSWTSurface;
  import org.cairographics.cairo.CairoSurface;
- 
  import org.eclipse.swt.events.KeyAdapter;
  import org.eclipse.swt.events.KeyEvent;
--- 37,40 ----
***************
*** 53,56 ****
--- 52,57 ----
      public TestCairoImage() {
          super();
+         // if using glitz turn off double buffering of the shell
+         CairoGlitzSurface.widgetSetDoubleBuffered(this, false);
          this.addPaintListener(new PaintListener() {
              public void paintControl(PaintEvent e) {
***************
*** 224,231 ****
          draw_stuff(cairo);
  
!         sf.setDrawBuffer(CairoGlitzSurface.GLITZ_BUFFER_FRONT);
!         sf.copyArea(sf, 0, 0, this.getSize().x, this.getSize().y, 0, 0);
!         sf.setDrawBuffer(CairoGlitzSurface.GLITZ_BUFFER_BACK);
!         sf.flush();
          cairo.dispose();
          
--- 225,230 ----
          draw_stuff(cairo);
  
!         sf.swapBuffers();
!         
          cairo.dispose();
          





More information about the cairo-commit mailing list