Index: src/gpu/GrClipMaskManager.cpp |
=================================================================== |
--- src/gpu/GrClipMaskManager.cpp (revision 12025) |
+++ src/gpu/GrClipMaskManager.cpp (working copy) |
@@ -392,7 +392,8 @@ |
// hit) |
bool GrClipMaskManager::getMaskTexture(int32_t clipStackGenID, |
const SkIRect& clipSpaceIBounds, |
- GrTexture** result) { |
+ GrTexture** result, |
+ bool willUpload) { |
bool cached = fAACache.canReuse(clipStackGenID, clipSpaceIBounds); |
if (!cached) { |
@@ -402,7 +403,7 @@ |
fAACache.reset(); |
GrTextureDesc desc; |
- desc.fFlags = kRenderTarget_GrTextureFlagBit; |
+ desc.fFlags = willUpload ? kNone_GrTextureFlags : kRenderTarget_GrTextureFlagBit; |
desc.fWidth = clipSpaceIBounds.width(); |
desc.fHeight = clipSpaceIBounds.height(); |
desc.fConfig = kRGBA_8888_GrPixelConfig; |
@@ -427,7 +428,7 @@ |
SkASSERT(kNone_ClipMaskType == fCurrClipMaskType); |
GrTexture* result; |
- if (this->getMaskTexture(clipStackGenID, clipSpaceIBounds, &result)) { |
+ if (this->getMaskTexture(clipStackGenID, clipSpaceIBounds, &result, false)) { |
fCurrClipMaskType = kAlpha_ClipMaskType; |
return result; |
} |
@@ -925,7 +926,7 @@ |
SkASSERT(kNone_ClipMaskType == fCurrClipMaskType); |
GrTexture* result; |
- if (this->getMaskTexture(clipStackGenID, clipSpaceIBounds, &result)) { |
+ if (this->getMaskTexture(clipStackGenID, clipSpaceIBounds, &result, true)) { |
return result; |
} |