diff options
author | Robert Phillips <robertphillips@google.com> | 2017-12-01 15:32:35 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-01 21:10:39 +0000 |
commit | 51b20f266fbfa9d074bca9ce949d35f10340a9b4 (patch) | |
tree | 91ca14b2534b268cec006d8344299541d9016c6d /src/gpu/GrResourceAllocator.cpp | |
parent | ec727c981dd7ed83e98c7713c2828c6ab144937b (diff) |
Add explicit GPU resource allocation of deferred proxies
Change-Id: I5d5f5ca830feba143f494c25344f8614a88cb2cc
Reviewed-on: https://skia-review.googlesource.com/79220
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrResourceAllocator.cpp')
-rw-r--r-- | src/gpu/GrResourceAllocator.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrResourceAllocator.cpp b/src/gpu/GrResourceAllocator.cpp index bf46c61e8e..5f40a92a41 100644 --- a/src/gpu/GrResourceAllocator.cpp +++ b/src/gpu/GrResourceAllocator.cpp @@ -51,7 +51,12 @@ void GrResourceAllocator::addInterval(GrSurfaceProxy* proxy, unsigned int start, if (Interval* intvl = fIntvlHash.find(proxy->uniqueID().asUInt())) { // Revise the interval for an existing use #ifdef SK_DEBUG - if (isDirectDstRead) { + if (0 == start && 0 == end) { + // This interval is for the initial upload to a deferred proxy. Due to the vagaries + // of how deferred proxies are collected they can appear as uploads multiple times in a + // single opLists' list and as uploads in several opLists. + SkASSERT(0 == intvl->start()); + } else if (isDirectDstRead) { // Direct reads from the render target itself should occur w/in the existing interval SkASSERT(intvl->start() <= start && intvl->end() >= end); } else { |