Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index bcd84dd63c87aad29b00153dda694ea033f41026..5b157d2a8e83880f13cf55beff320558b46a4b2f 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -223,6 +223,14 @@ GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, |
//////////////////////////////////////////////////////////////////////////////// |
+bool GrContext::isConfigTexturable(GrPixelConfig config) const { |
+ return fGpu->caps()->isConfigTexturable(config); |
+} |
+ |
+bool GrContext::npotTextureTileSupport() const { |
+ return fGpu->caps()->npotTextureTileSupport(); |
+} |
+ |
GrTexture* GrContext::createTexture(const GrSurfaceDesc& desc, const void* srcData, |
size_t rowBytes) { |
return fGpu->createTexture(desc, true, srcData, rowBytes); |
@@ -230,6 +238,11 @@ GrTexture* GrContext::createTexture(const GrSurfaceDesc& desc, const void* srcDa |
GrTexture* GrContext::refScratchTexture(const GrSurfaceDesc& inDesc, ScratchTexMatch match, |
bool calledDuringFlush) { |
+ // Currently we don't recycle compressed textures as scratch. |
+ if (GrPixelConfigIsCompressed(inDesc.fConfig)) { |
+ return NULL; |
+ } |
+ |
// kNoStencil has no meaning if kRT isn't set. |
SkASSERT((inDesc.fFlags & kRenderTarget_GrSurfaceFlag) || |
!(inDesc.fFlags & kNoStencil_GrSurfaceFlag)); |
@@ -338,14 +351,6 @@ GrRenderTarget* GrContext::wrapBackendRenderTarget(const GrBackendRenderTargetDe |
return fGpu->wrapBackendRenderTarget(desc); |
} |
-/////////////////////////////////////////////////////////////////////////////// |
- |
-bool GrContext::supportsIndex8PixelConfig() const { |
- const GrDrawTargetCaps* caps = fGpu->caps(); |
- return caps->isConfigTexturable(kIndex_8_GrPixelConfig); |
-} |
- |
- |
//////////////////////////////////////////////////////////////////////////////// |
void GrContext::clear(const SkIRect* rect, |