diff options
author | Robert Phillips <robertphillips@google.com> | 2017-01-27 10:58:31 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-27 17:00:38 +0000 |
commit | 26caf898f1db66bc6923b61ef902132bbdff51dd (patch) | |
tree | 09f27bfcf01e42c750a694f8ea5310d1e5168207 /tests/RectangleTextureTest.cpp | |
parent | 882ccafee00a7d8d924258d59606fa878c0d9777 (diff) |
Add utilities to create GrSurfaceProxy & GrSurfaceContext from backend descs
Change-Id: Iff2278de8ddd6c0dff74e5cf1996702bad31217b
Reviewed-on: https://skia-review.googlesource.com/7647
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/RectangleTextureTest.cpp')
-rw-r--r-- | tests/RectangleTextureTest.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp index d55b882f7e..ef5f2d31a6 100644 --- a/tests/RectangleTextureTest.cpp +++ b/tests/RectangleTextureTest.cpp @@ -133,23 +133,12 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { } } - sk_sp<GrSurfaceProxy> rectProxy; - - { - sk_sp<GrTexture> rectangleTexture( - context->textureProvider()->wrapBackendTexture(rectangleDesc)); - if (!rectangleTexture) { - ERRORF(reporter, "Error wrapping rectangle texture in GrTexture."); - GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); - continue; - } - - rectProxy = GrSurfaceProxy::MakeWrapped(std::move(rectangleTexture)); - if (!rectProxy) { - ERRORF(reporter, "Error creating proxy for rectangle texture."); - GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); - continue; - } + sk_sp<GrSurfaceProxy> rectProxy = GrSurfaceProxy::MakeWrappedBackend(context, + rectangleDesc); + if (!rectProxy) { + ERRORF(reporter, "Error creating proxy for rectangle texture."); + GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); + continue; } test_basic_draw_as_src(reporter, context, rectProxy, refPixels); |