Don't use the usage flag to determine whether an SkGpuDevice needs to be cleared...
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 9 Apr 2012 21:40:54 +0000 (21:40 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 9 Apr 2012 21:40:54 +0000 (21:40 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@3635 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/SkGpuDevice.cpp

index c7bae34..c2e090c 100644 (file)
@@ -1872,8 +1872,8 @@ SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
     GrContext::TextureCacheEntry cacheEntry;
     GrTexture* texture;
     SkAutoTUnref<GrTexture> tunref;
-    // Skia's convention is to only clear a device if it is a non-opaque layer.
-    bool needClear = !isOpaque && kSaveLayer_Usage == usage;
+    // Skia's convention is to only clear a device if it is non-opaque.
+    bool needClear = !isOpaque;
 
 #if CACHE_COMPATIBLE_DEVICE_TEXTURES
     // layers are never draw in repeat modes, so we can request an approx