Force BackendTextureImageGenerator to work on only 1 consumer context
Bug: skia:
Change-Id: I83d3e4af6f20c877c541964fdd489434f6a62b25
Reviewed-on: https://skia-review.googlesource.com/93200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index ffccb85..078bd7c 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -893,11 +893,12 @@
proxy.reset(nullptr);
proxySecondRef.reset(nullptr);
- // Now we should be able to borrow the texture from the other context
+ // Now we should still fail to be able to borrow the texture from the other context
+ // since only one context can ever borrow
otherTestContext->makeCurrent();
otherProxy = as_IB(refImg)->asTextureProxyRef(otherCtx, GrSamplerState::ClampNearest(),
nullptr, &texColorSpace, nullptr);
- REPORTER_ASSERT(reporter, otherProxy);
+ REPORTER_ASSERT(reporter, !otherProxy);
// Release everything
otherProxy.reset(nullptr);