Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 53133002: Make not-reusing-scratch-textures only apply to texture uploads (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698