Index: src/gpu/GrGpu.cpp |
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
index 111f632502f075632028689fa64fcf483f7e9e29..f9e7ac3d57c3314bab65011e014280ade9658986 100644 |
--- a/src/gpu/GrGpu.cpp |
+++ b/src/gpu/GrGpu.cpp |
@@ -133,6 +133,24 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc, |
return tex; |
} |
+GrTexture* GrGpu::createCompressedTexture(const GrTextureDesc& desc, |
+ const void* srcData, GrCompressedFormat format) { |
+ if (kUnknown_GrPixelConfig == desc.fConfig) { |
+ return NULL; |
+ } |
+ if (desc.fFlags & kRenderTarget_GrTextureFlagBit) { |
+ return NULL; |
+ } |
+ |
+ // Do we support this format? |
+ if (!this->caps()->compressedTextureSupport(format)) { |
+ return NULL; |
+ } |
+ |
+ this->handleDirtyContext(); |
+ return this->onCreateCompressedTexture(desc, srcData, format); |
+} |
+ |
bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) { |
SkASSERT(NULL == rt->getStencilBuffer()); |
GrStencilBuffer* sb = |