aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrClipMaskManager.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}