diff options
author | Brian Osman <brianosman@google.com> | 2017-05-08 11:16:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-08 15:48:44 +0000 |
commit | 0562eb9c6c98f07732ca96a1dd4e986f1ca089b8 (patch) | |
tree | b2df127ae523cc032e8e89d45c62258747c8d43d /src/gpu/GrGpuResourcePriv.h | |
parent | af6522adc17b06d82ec60afbfd41e9e4c48bfc9e (diff) |
Allow wrapped resources to have unique keys
Previously, wrapped resources were never budgeted. Now we explicitly allow
wrapped, unbudgeted resources with unique keys. This allows code that
wraps (and re-wraps) external resources with a deterministic key to find
the same wrapped resource - saving time and ensuring a single wrapped
copy, to preserve state on the resource (like texture sampler state).
Bug: skia:
Change-Id: I1dd7642f1ed8bb6c620029d46203cf5cb6b3c160
Reviewed-on: https://skia-review.googlesource.com/15241
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrGpuResourcePriv.h')
-rw-r--r-- | src/gpu/GrGpuResourcePriv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrGpuResourcePriv.h b/src/gpu/GrGpuResourcePriv.h index 82bf072db4..a1e207d77c 100644 --- a/src/gpu/GrGpuResourcePriv.h +++ b/src/gpu/GrGpuResourcePriv.h @@ -45,7 +45,7 @@ public: */ SkBudgeted isBudgeted() const { bool ret = SkBudgeted::kYes == fResource->fBudgeted; - SkASSERT(ret || !fResource->getUniqueKey().isValid()); + SkASSERT(ret || !fResource->getUniqueKey().isValid() || fResource->fRefsWrappedObjects); return SkBudgeted(ret); } |