changeset 1398:b27852b420e2

RT-21828 Canvas Screen Lock
author "Joseph Andresen<joseph.andresen@oracle.com>"
date Mon, 02 Jul 2012 06:08:37 -0700
parents 40d9b78ba945
children 6b0866a7c08c
files javafx-ui-common/src/javafx/scene/canvas/Canvas.java javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java
diffstat 2 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/canvas/Canvas.java	Mon Jul 02 14:50:42 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/canvas/Canvas.java	Mon Jul 02 06:08:37 2012 -0700
@@ -95,6 +95,7 @@
     }
 
     GrowableDataBuffer<Object> getBuffer() {
+        impl_markDirty(DirtyBits.NODE_CONTENTS);
         if (theBuffer == null) {
             theBuffer = new GrowableDataBuffer<Object>(DEFAULT_BUF_SIZE);
         }
@@ -111,12 +112,6 @@
         return theContext;
     }
 
-    void markBufferDirty() {
-        if (theBuffer == null || theBuffer.position() == 0) {
-            impl_markDirty(DirtyBits.NODE_CONTENTS);
-        }
-    }
-
     /**
      * Defines the width of the canvas.
      *
--- a/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jul 02 14:50:42 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jul 02 06:08:37 2012 -0700
@@ -211,7 +211,6 @@
     }
 
     private GrowableDataBuffer getBuffer() {
-        theCanvas.markBufferDirty();
         return theCanvas.getBuffer();
     }