reenable complexclip3 for gpu
authorbsalomon <bsalomon@google.com>
Mon, 22 Dec 2014 16:40:49 +0000 (08:40 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 22 Dec 2014 16:40:49 +0000 (08:40 -0800)
Review URL: https://codereview.chromium.org/814273003

gm/complexclip3.cpp
src/gpu/GrClipMaskManager.cpp

index 1cea1ce7bdc537036233f160afd8478640d5cca5..bae5c5a774dff59e989acf092168ec81d1ee0fe0 100644 (file)
@@ -22,7 +22,7 @@ public:
 
 protected:
     uint32_t onGetFlags() const SK_OVERRIDE {
-        return kSkipTiled_Flag | kSkipGPU_Flag;
+        return kSkipTiled_Flag;
     }
 
     SkString onShortName() {
index 797a21a1a686b4a032b36acc6c2532e651144b6a..5e2c0aa795522a85d0a82b15016e2d8c5a000cdb 100644 (file)
@@ -450,7 +450,11 @@ GrTexture* GrClipMaskManager::createTempMask(int width, int height) {
     desc.fFlags = kRenderTarget_GrSurfaceFlag;
     desc.fWidth = width;
     desc.fHeight = height;
-    desc.fConfig = kAlpha_8_GrPixelConfig;
+    if (this->getContext()->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) {
+        desc.fConfig = kAlpha_8_GrPixelConfig;
+    } else {
+        desc.fConfig = kRGBA_8888_GrPixelConfig;
+    }
 
     return this->getContext()->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch);
 }