diff options
author | 2017-11-29 16:48:25 -0700 | |
---|---|---|
committer | 2017-11-30 12:14:02 +0000 | |
commit | 8816b93134db2fecdfd690fd26967468f6c814b9 (patch) | |
tree | 7bc34f2815e5006671d4af6d377f3171cc3ca7e2 /src/gpu/GrResourceAllocator.cpp | |
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.cpp')
-rw-r--r-- | src/gpu/GrResourceAllocator.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/GrResourceAllocator.cpp b/src/gpu/GrResourceAllocator.cpp index 5cb882f61c..0afc0ed8c9 100644 --- a/src/gpu/GrResourceAllocator.cpp +++ b/src/gpu/GrResourceAllocator.cpp @@ -43,14 +43,21 @@ GrResourceAllocator::~GrResourceAllocator() { #endif } -void GrResourceAllocator::addInterval(GrSurfaceProxy* proxy, - unsigned int start, unsigned int end) { +void GrResourceAllocator::addInterval(GrSurfaceProxy* proxy, unsigned int start, unsigned int end + SkDEBUGCODE(, bool isDirectDstRead)) { SkASSERT(start <= end); SkASSERT(!fAssigned); // We shouldn't be adding any intervals after (or during) assignment if (Interval* intvl = fIntvlHash.find(proxy->uniqueID().asUInt())) { // Revise the interval for an existing use - SkASSERT(intvl->end() <= start && intvl->end() <= end); +#ifdef SK_DEBUG + if (isDirectDstRead) { + // Direct reads from the render target itself should occur w/in the existing interval + SkASSERT(intvl->start() <= start && intvl->end() >= end); + } else { + SkASSERT(intvl->end() <= start && intvl->end() <= end); + } +#endif intvl->extendEnd(end); return; } |