aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-12-22 08:40:49 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-22 08:40:49 -0800
commit51d1f7e3a4305e517586dc158a0329bbaa8896aa (patch)
tree8fa5211721f24acd6c1ad571cbeb9164a755b668
parentfa1e8a7cefd71f7b75f0b85f8eefe111814dd86f (diff)
reenable complexclip3 for gpu
-rw-r--r--gm/complexclip3.cpp2
-rw-r--r--src/gpu/GrClipMaskManager.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/gm/complexclip3.cpp b/gm/complexclip3.cpp
index 1cea1ce7bd..bae5c5a774 100644
--- a/gm/complexclip3.cpp
+++ b/gm/complexclip3.cpp
@@ -22,7 +22,7 @@ public:
protected:
uint32_t onGetFlags() const SK_OVERRIDE {
- return kSkipTiled_Flag | kSkipGPU_Flag;
+ return kSkipTiled_Flag;
}
SkString onShortName() {
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 797a21a1a6..5e2c0aa795 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -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);
}