OSDN Git Service

Clear up the bitmap with white color at initial time
authorTeng-Hui Zhu <ztenghui@google.com>
Mon, 11 Jul 2011 21:32:32 +0000 (14:32 -0700)
committerTeng-Hui Zhu <ztenghui@google.com>
Mon, 11 Jul 2011 22:01:52 +0000 (15:01 -0700)
bug:4995281

Change-Id: Iee2d508c234d3e1cecb367b0108fd7215730173c

Source/WebCore/platform/graphics/android/RasterRenderer.cpp

index dc35cdd..35fc35a 100644 (file)
@@ -90,6 +90,10 @@ void RasterRenderer::setupCanvas(const TileRenderInfo& renderInfo, SkCanvas* can
             renderInfo.invalRect->width(), renderInfo.invalRect->height());
     bitmap.allocPixels();
 
+    // Clear the bitmap to whiteness first.
+    bitmap.setIsOpaque(true);
+    bitmap.eraseARGB(255, 255, 255, 255);
+
     SkDevice* device = new SkDevice(NULL, bitmap, false);
 
     if (renderInfo.measurePerf) {