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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 324963005: Split caching from allocation in GrClipMaskManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Code review changes Created 6 years, 6 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 | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.h
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 260d708fd8ad8091ef5d26b3460ce7492b2924a3..c3a21fd8a2b1e9d6771ebde48bbdaa2731b28b85 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -130,13 +130,16 @@ private:
const GrReducedClip::ElementList& elements,
const SkIRect& clipSpaceIBounds);
- // Gets a texture to use for the clip mask. If true is returned then a cached mask was found
- // that already contains the rasterization of the clip stack, otherwise an uninitialized texture
- // is returned. 'willUpload' is set when the alpha mask needs to be uploaded from the CPU.
- bool getMaskTexture(int32_t elementsGenID,
- const SkIRect& clipSpaceIBounds,
- GrTexture** result,
- bool willUpload);
+ // Returns the cached mask texture if it matches the elementsGenID and the clipSpaceIBounds.
+ // Returns NULL if not found.
+ GrTexture* getCachedMaskTexture(int32_t elementsGenID, const SkIRect& clipSpaceIBounds);
+
+
+ // Handles allocation (if needed) of a clip alpha-mask texture for both the sw-upload
+ // or gpu-rendered cases.
+ GrTexture* allocMaskTexture(int32_t elementsGenID,
+ const SkIRect& clipSpaceIBounds,
+ bool willUpload);
bool useSWOnlyPath(const GrReducedClip::ElementList& elements);
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698