diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-11-29 16:48:25 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-30 12:14:02 +0000 |
commit | 8816b93134db2fecdfd690fd26967468f6c814b9 (patch) | |
tree | 7bc34f2815e5006671d4af6d377f3171cc3ca7e2 /src/gpu/GrResourceAllocator.h | |
parent | 713571f9afcf4b673812cd3b52bb5b17c107038b (diff) |
Make sure to visit clips and dst proxies during gather
Bug: skia:7190
Change-Id: I0cd4f7734047550c7904f44892ef266498842e0c
Reviewed-on: https://skia-review.googlesource.com/77940
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrResourceAllocator.h')
-rw-r--r-- | src/gpu/GrResourceAllocator.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gpu/GrResourceAllocator.h b/src/gpu/GrResourceAllocator.h index f576649030..0030ed2231 100644 --- a/src/gpu/GrResourceAllocator.h +++ b/src/gpu/GrResourceAllocator.h @@ -47,12 +47,14 @@ public: // Add a usage interval from 'start' to 'end' inclusive. This is usually used for renderTargets. // If an existing interval already exists it will be expanded to include the new range. - void addInterval(GrSurfaceProxy*, unsigned int start, unsigned int end); + void addInterval(GrSurfaceProxy*, unsigned int start, unsigned int end + SkDEBUGCODE(, bool isDirectDstRead = false)); // Add an interval that spans just the current op. Usually this is for texture uses. // If an existing interval already exists it will be expanded to include the new operation. - void addInterval(GrSurfaceProxy* proxy) { - this->addInterval(proxy, fNumOps, fNumOps); + void addInterval(GrSurfaceProxy* proxy + SkDEBUGCODE(, bool isDirectDstRead = false)) { + this->addInterval(proxy, fNumOps, fNumOps SkDEBUGCODE(, isDirectDstRead)); } // Returns true when the opLists from 'startIndex' to 'stopIndex' should be executed; @@ -120,8 +122,9 @@ private: void setNext(Interval* next) { fNext = next; } void extendEnd(unsigned int newEnd) { - SkASSERT(newEnd >= fEnd); - fEnd = newEnd; + if (newEnd > fEnd) { + fEnd = newEnd; + } } void assign(sk_sp<GrSurface>); |