diff options
author | Robert Phillips <robertphillips@google.com> | 2017-12-12 13:01:25 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-12 18:45:09 +0000 |
commit | d21b2a5d5c5dca87b7df02713782e722a2c0ae92 (patch) | |
tree | d2f24173bbc6840e56f455d518b69ffc02e3c948 /tests/WritePixelsTest.cpp | |
parent | f3506fa87d0090bd01688e5d26f062fe2bdb801c (diff) |
Remove GrBackendObject from tests (except image_from_yuv_textures)
This sets the stage for landing https://skia-review.googlesource.com/c/skia/+/82823 (Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture)
Change-Id: I2c62f23dc447b9ad55c0b5f06bcd6d7ca0ec4d2b
Reviewed-on: https://skia-review.googlesource.com/83920
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/WritePixelsTest.cpp')
-rw-r--r-- | tests/WritePixelsTest.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index 364cf1ae2d..bfa0d4d21c 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp @@ -428,22 +428,19 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixelsNonTexture_Gpu, reporter, ctxInfo) for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) { for (int sampleCnt : {0, 4}) { - auto handle = context->getGpu()->createTestingOnlyBackendTexture( - nullptr, DEV_W, DEV_H, kSkia8888_GrPixelConfig, true); - GrBackendTexture backendTexture = GrTest::CreateBackendTexture( - ctxInfo.backend(), DEV_W, DEV_H, kSkia8888_GrPixelConfig, GrMipMapped::kNo, - handle); + GrBackendTexture backendTex = context->getGpu()->createTestingOnlyBackendTexture( + nullptr, DEV_W, DEV_H, kSkia8888_GrPixelConfig, true, GrMipMapped::kNo); sk_sp<SkSurface> surface(SkSurface::MakeFromBackendTextureAsRenderTarget( - context, backendTexture, origin, sampleCnt, nullptr, nullptr)); + context, backendTex, origin, sampleCnt, nullptr, nullptr)); if (!surface) { - context->getGpu()->deleteTestingOnlyBackendTexture(handle); + context->getGpu()->deleteTestingOnlyBackendTexture(&backendTex); continue; } test_write_pixels(reporter, surface.get()); surface.reset(); - context->getGpu()->deleteTestingOnlyBackendTexture(handle); + context->getGpu()->deleteTestingOnlyBackendTexture(&backendTex); } } } |