Review URL: https://codereview.chromium.org/
814273003
protected:
uint32_t onGetFlags() const SK_OVERRIDE {
- return kSkipTiled_Flag | kSkipGPU_Flag;
+ return kSkipTiled_Flag;
}
SkString onShortName() {
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);
}