diff options
author | Brian Salomon <bsalomon@google.com> | 2017-05-23 10:43:51 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-23 18:07:25 +0000 |
commit | 45e5068a6d10f4e4fd4658824310f8871f02ccf7 (patch) | |
tree | 6d6fa75f2539789b5c6021f628e5ad543681af09 /include/private/GrSurfaceProxy.h | |
parent | ccb46aaef838e1bd9d2feb249fb65aa935d7dc2c (diff) |
Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation.
Bug: chromium:656320
Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1
Reviewed-on: https://skia-review.googlesource.com/17391
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/private/GrSurfaceProxy.h')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 1b7950c510..4ae041d4dd 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -323,6 +323,7 @@ protected: , fFit(fit) , fBudgeted(budgeted) , fFlags(flags) + , fNeedsClear(SkToBool(desc.fFlags & kPerformInitialClear_GrSurfaceFlag)) , fGpuMemorySize(kInvalidGpuMemorySize) , fLastOpList(nullptr) { // Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources @@ -359,7 +360,6 @@ protected: // mutable bc of SkSurface/SkImage wishy-washiness const uint32_t fFlags; - const UniqueID fUniqueID; // set from the backing resource for wrapped resources static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0); @@ -368,6 +368,8 @@ protected: private: virtual size_t onUninstantiatedGpuMemorySize() const = 0; + bool fNeedsClear; + // This entry is lazily evaluated so, when the proxy wraps a resource, the resource // will be called but, when the proxy is deferred, it will compute the answer itself. // If the proxy computes its own answer that answer is checked (in debug mode) in |