Bug 796084 - Rename mCheckerboardLayer -> mScreenshotLayer. r=blassey
authorBenoit Girard <b56girard@gmail.com>
Mon, 01 Oct 2012 15:51:46 -0400
changeset 108957 3d9f6bb75bb0e8d777cc3fa38a023e9a3f5a2ee1
parent 108956 68bf9d057cf441df1a865aecad71ea3f1084c429
child 108958 1b0fd0ddbfecfd1f85a58855d3d6c8d249589694
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersblassey
bugs796084
milestone18.0a1
Bug 796084 - Rename mCheckerboardLayer -> mScreenshotLayer. r=blassey
mobile/android/base/gfx/LayerRenderer.java
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -41,17 +41,17 @@ public class LayerRenderer {
      */
     private static final int MAX_FRAME_TIME = 16;   /* 1000 ms / 60 FPS */
 
     private static final int FRAME_RATE_METER_WIDTH = 128;
     private static final int FRAME_RATE_METER_HEIGHT = 32;
 
     private final LayerView mView;
     private final SingleTileLayer mBackgroundLayer;
-    private final ScreenshotLayer mCheckerboardLayer;
+    private final ScreenshotLayer mScreenshotLayer;
     private final NinePatchTileLayer mShadowLayer;
     private TextLayer mFrameRateLayer;
     private final ScrollbarLayer mHorizScrollLayer;
     private final ScrollbarLayer mVertScrollLayer;
     private final FadeRunnable mFadeRunnable;
     private ByteBuffer mCoordByteBuffer;
     private FloatBuffer mCoordBuffer;
     private RenderContext mLastPageContext;
@@ -120,40 +120,40 @@ public class LayerRenderer {
         "varying vec2 vTexCoord;\n" +
         "uniform sampler2D sTexture;\n" +
         "void main() {\n" +
         "    gl_FragColor = texture2D(sTexture, vTexCoord);\n" +
         "}\n";
 
     public void setCheckerboardBitmap(ByteBuffer data, int width, int height, RectF pageRect, Rect copyRect) {
         try {
-            mCheckerboardLayer.setBitmap(data, width, height, copyRect);
+            mScreenshotLayer.setBitmap(data, width, height, copyRect);
         } catch (IllegalArgumentException ex) {
             Log.e(LOGTAG, "error setting bitmap: ", ex);
         }
-        mCheckerboardLayer.beginTransaction();
+        mScreenshotLayer.beginTransaction();
         try {
-            mCheckerboardLayer.setPosition(RectUtils.round(pageRect));
-            mCheckerboardLayer.invalidate();
+            mScreenshotLayer.setPosition(RectUtils.round(pageRect));
+            mScreenshotLayer.invalidate();
         } finally {
-            mCheckerboardLayer.endTransaction();
+            mScreenshotLayer.endTransaction();
         }
     }
 
     public void resetCheckerboard() {
-        mCheckerboardLayer.reset();
+        mScreenshotLayer.reset();
     }
 
     public LayerRenderer(LayerView view) {
         mView = view;
 
         CairoImage backgroundImage = new BufferedCairoImage(view.getBackgroundPattern());
         mBackgroundLayer = new SingleTileLayer(true, backgroundImage);
 
-        mCheckerboardLayer = ScreenshotLayer.create();
+        mScreenshotLayer = ScreenshotLayer.create();
 
         CairoImage shadowImage = new BufferedCairoImage(view.getShadowPattern());
         mShadowLayer = new NinePatchTileLayer(shadowImage);
 
         mHorizScrollLayer = ScrollbarLayer.create(this, false);
         mVertScrollLayer = ScrollbarLayer.create(this, true);
         mFadeRunnable = new FadeRunnable();
 
@@ -460,17 +460,17 @@ public class LayerRenderer {
                 }
             }
             mLastPageContext = mPageContext;
 
             /* Update layers. */
             if (rootLayer != null) mUpdated &= rootLayer.update(mPageContext);  // called on compositor thread
             mUpdated &= mBackgroundLayer.update(mScreenContext);    // called on compositor thread
             mUpdated &= mShadowLayer.update(mPageContext);  // called on compositor thread
-            mUpdated &= mCheckerboardLayer.update(mPageContext);   // called on compositor thread
+            mUpdated &= mScreenshotLayer.update(mPageContext);   // called on compositor thread
             if (mFrameRateLayer != null) mUpdated &= mFrameRateLayer.update(mScreenContext); // called on compositor thread
             mUpdated &= mVertScrollLayer.update(mPageContext);  // called on compositor thread
             mUpdated &= mHorizScrollLayer.update(mPageContext); // called on compositor thread
 
             for (Layer layer : mExtraLayers)
                 mUpdated &= layer.update(mPageContext); // called on compositor thread
         }
 
@@ -541,23 +541,23 @@ public class LayerRenderer {
                 mShadowLayer.draw(mPageContext);
 
             /* Draw the 'checkerboard'. We use gfx.show_checkerboard_pattern to
              * determine whether to draw the screenshot layer.
              */
             if (mView.checkerboardShouldShowChecks()) {
                 /* Find the area the root layer will render into, to mask the checkerboard layer */
                 Rect rootMask = getMaskForLayer(mView.getLayerClient().getRoot());
-                mCheckerboardLayer.setMask(rootMask);
+                mScreenshotLayer.setMask(rootMask);
 
                 /* Scissor around the page-rect, in case the page has shrunk
                  * since the screenshot layer was last updated.
                  */
                 setScissorRect(); // Calls glEnable(GL_SCISSOR_TEST))
-                mCheckerboardLayer.draw(mPageContext);
+                mScreenshotLayer.draw(mPageContext);
             }
         }
 
         // Draws the layer the client added to us.
         void drawRootLayer() {
             Layer rootLayer = mView.getLayerClient().getRoot();
             if (rootLayer == null) {
                 return;