changeset 1469:981229961e87

Revert unintended change to Canvas.java in changeset b64bf5349e9e
author kcr
date Tue, 24 Jul 2012 10:49:53 -0700
parents eee434a2e013
children dbbe8fbc5a1b
files javafx-ui-common/src/javafx/scene/canvas/Canvas.java
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/canvas/Canvas.java	Tue Jul 24 10:42:09 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/canvas/Canvas.java	Tue Jul 24 10:49:53 2012 -0700
@@ -68,7 +68,7 @@
  * </pre>
  * </p>
  *
- * @since JavaFX 2.2
+ * @since 2.2
  */
 public class Canvas extends Node {
     private static final int DEFAULT_BUF_SIZE = 1024;
@@ -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.
      *