aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-03-08 15:27:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-08 21:05:21 +0000
commit4684f82ebca85d4c7043e5c1028e34cf5631da32 (patch)
tree6e640d1b212ab614fa19ccd4e43c5adff440dacd /include
parent3adc12213b2d1efbe417476517ff3381af17a311 (diff)
Add ability to uninstantiate lazy proxies after every flush.
Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/private/GrSurfaceProxy.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 470ab7de65..d90c408ba6 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -58,7 +58,8 @@ public:
#endif
void release() {
- SkASSERT(1 == fRefCnt);
+ // The proxy itself may still have multiple refs. It can be owned by an SkImage and multiple
+ // SkDeferredDisplayLists at the same time if we are using DDLs.
SkASSERT(0 == fPendingReads);
SkASSERT(0 == fPendingWrites);
@@ -194,8 +195,10 @@ private:
class GrSurfaceProxy : public GrIORefProxy {
public:
enum class LazyInstantiationType {
- kSingleUse, // Instantiation callback is allowed to be called only once
- kMultipleUse, // Instantiation callback can be called multiple times.
+ kSingleUse, // Instantiation callback is allowed to be called only once
+ kMultipleUse, // Instantiation callback can be called multiple times.
+ kUninstantiate, // Instantiation callback can be called multiple times,
+ // but we will uninstantiate the proxy after every flush
};
enum class LazyState {