diff options
author | Greg Daniel <egdaniel@google.com> | 2017-12-18 14:48:15 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-18 21:17:46 +0000 |
commit | f5d8758f29390fd5c135df12bc8a5e196854eda2 (patch) | |
tree | a7de0b54b030dda4549bc9feb0a0e2ff65ded7d6 /tests | |
parent | 4fafedd33add9948db1147c60d681ed9340984fd (diff) |
Add new SkImage factory to create from GrBackendTexture with SkColorType
Bug: skia:
Change-Id: I46bdc54b6d9cdacc8f5a06644aa6b110837879f0
Reviewed-on: https://skia-review.googlesource.com/84342
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GrMipMappedTest.cpp | 8 | ||||
-rw-r--r-- | tests/ImageFilterCacheTest.cpp | 4 | ||||
-rw-r--r-- | tests/ImageTest.cpp | 3 | ||||
-rw-r--r-- | tests/SurfaceSemaphoreTest.cpp | 3 |
4 files changed, 14 insertions, 4 deletions
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index 58faec4f8b..91fba5f919 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp @@ -61,7 +61,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) { } else { image = SkImage::MakeFromTexture(context, backendTex, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, nullptr); + kRGBA_8888_SkColorType, + kPremul_SkAlphaType, nullptr, + nullptr, nullptr); proxy = as_IB(image)->asTextureProxyRef(); } REPORTER_ASSERT(reporter, proxy); @@ -108,7 +110,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, sk_sp<SkImage> image = SkImage::MakeFromTexture(context, backendTex, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, nullptr); + kRGBA_8888_SkColorType, + kPremul_SkAlphaType, nullptr, + nullptr, nullptr); GrTextureProxy* proxy = as_IB(image)->peekProxy(); REPORTER_ASSERT(reporter, proxy); diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index bcd451127b..fb9d04b01d 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -221,7 +221,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, ct sk_sp<SkImage> srcImage(SkImage::MakeFromTexture(context, backendTex, texOrigin, - kPremul_SkAlphaType, nullptr)); + kRGBA_8888_SkColorType, + kPremul_SkAlphaType, nullptr, + nullptr, nullptr)); if (!srcImage) { return; } diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index 1415bcb67d..ff058f2ec7 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -730,7 +730,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkImage_NewFromTextureRelease, reporter, c TextureReleaseChecker releaseChecker; GrSurfaceOrigin texOrigin = kBottomLeft_GrSurfaceOrigin; sk_sp<SkImage> refImg( - SkImage::MakeFromTexture(ctx, backendTex, texOrigin, kPremul_SkAlphaType, nullptr, + SkImage::MakeFromTexture(ctx, backendTex, texOrigin, kRGBA_8888_SkColorType, + kPremul_SkAlphaType, nullptr, TextureReleaseChecker::Release, &releaseChecker)); GrSurfaceOrigin readBackOrigin; diff --git a/tests/SurfaceSemaphoreTest.cpp b/tests/SurfaceSemaphoreTest.cpp index 8ae0953d88..b4f63fec41 100644 --- a/tests/SurfaceSemaphoreTest.cpp +++ b/tests/SurfaceSemaphoreTest.cpp @@ -83,7 +83,10 @@ void draw_child(skiatest::Reporter* reporter, sk_sp<SkImage> childImage = SkImage::MakeFromTexture(childCtx, backendTexture, kTopLeft_GrSurfaceOrigin, + kRGBA_8888_SkColorType, kPremul_SkAlphaType, + nullptr, + nullptr, nullptr); SkCanvas* childCanvas = childSurface->getCanvas(); |