Index: src/gpu/GrGpu.cpp |
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
index 186091f20cc176152ea7570ec2c3efb32fc18011..4c3e5de543a6227671f4bd64a5ab2c7ebda0a8bd 100644 |
--- a/src/gpu/GrGpu.cpp |
+++ b/src/gpu/GrGpu.cpp |
@@ -113,6 +113,10 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc, |
if (kUnknown_GrPixelConfig == desc.fConfig) { |
return NULL; |
} |
+ if ((desc.fFlags & kRenderTarget_GrTextureFlagBit) && |
+ !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) { |
+ return NULL; |
+ } |
this->handleDirtyContext(); |
GrTexture* tex = this->onCreateTexture(desc, srcData, rowBytes); |