aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ProxyTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-05 09:26:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-05 14:03:10 +0000
commiteee4d6e4e8cc5c4c79f065abcc3ce609f71238f9 (patch)
tree9a855a9892a8b3017370164355b88c2a4ac9c89c /tests/ProxyTest.cpp
parent9beafc41afa3c78ffa12649dcde73628c277da9c (diff)
Make instantiate return a Boolean
From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ProxyTest.cpp')
-rw-r--r--tests/ProxyTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 40cbeebdc7..dc34c76b66 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -52,8 +52,8 @@ static void check_rendertarget(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, rtProxy->numStencilSamples() == numSamples);
GrSurfaceProxy::UniqueID idBefore = rtProxy->uniqueID();
- GrRenderTarget* rt = rtProxy->instantiateRenderTarget(provider);
- REPORTER_ASSERT(reporter, rt);
+ REPORTER_ASSERT(reporter, rtProxy->instantiate(provider));
+ GrRenderTarget* rt = rtProxy->priv().peekRenderTarget();
REPORTER_ASSERT(reporter, rtProxy->uniqueID() == idBefore);
if (wasWrapped) {
@@ -86,8 +86,9 @@ static void check_texture(skiatest::Reporter* reporter,
SkBackingFit fit,
bool wasWrapped) {
GrSurfaceProxy::UniqueID idBefore = texProxy->uniqueID();
- GrTexture* tex = texProxy->instantiateTexture(provider);
- REPORTER_ASSERT(reporter, tex);
+
+ REPORTER_ASSERT(reporter, texProxy->instantiate(provider));
+ GrTexture* tex = texProxy->priv().peekTexture();
REPORTER_ASSERT(reporter, texProxy->uniqueID() == idBefore);
if (wasWrapped) {