diff options
author | 2016-11-11 12:38:40 -0500 | |
---|---|---|
committer | 2016-11-11 18:24:56 +0000 | |
commit | 294870ff119b89fc902773643b054f14e5d1f554 (patch) | |
tree | 8666a14ff9bd50c9138dcbc6f3331e51b8113268 /tests/ClearTest.cpp | |
parent | 498d403f7703cb2157bf3c877b84906db5a06cd4 (diff) |
Add explicit UniqueID classes for GrGpuResource & GrSurfaceProxy
This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4650
Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1
Reviewed-on: https://skia-review.googlesource.com/4650
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ClearTest.cpp')
-rw-r--r-- | tests/ClearTest.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp index d83fb92b53..d43e65ff0f 100644 --- a/tests/ClearTest.cpp +++ b/tests/ClearTest.cpp @@ -37,8 +37,15 @@ static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t return true; } +// TODO: this test does this thorough purging of the rendertargets b.c. right now +// the clear optimizations rely on the rendertarget's uniqueID. It can be +// relaxed when we switch that over to using rendertargetcontext ids (although +// we probably will want to have more clear values then too) static bool reset_rtc(sk_sp<GrRenderTargetContext>* rtc, GrContext* context, int w, int h) { - SkDEBUGCODE(uint32_t oldID = 0;) +#ifdef SK_DEBUG + GrGpuResource::UniqueID oldID = GrGpuResource::UniqueID::InvalidID(); +#endif + if (*rtc) { SkDEBUGCODE(oldID = (*rtc)->accessRenderTarget()->uniqueID();) rtc->reset(nullptr); |