aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-12-19 13:15:02 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-19 18:41:36 +0000
commitfaa095e9842b924c20de84dce1bcc1adad7fe2e4 (patch)
tree9651cd2720ae39bad1c364338540902b7910655c /tests/SurfaceTest.cpp
parent040238bded7b932b916c84912cbaec1207aa29c0 (diff)
Update SkSurface MakeFromBackend* factories to take an SkColorType.
Bug: skia: Change-Id: Ib1b03b1181ec937843eac2e8d8cb03ebe53e32c1 Reviewed-on: https://skia-review.googlesource.com/86760 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/SurfaceTest.cpp')
-rw-r--r--tests/SurfaceTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 4b5866466b..0864e32380 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -598,6 +598,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture(
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTexture(context, *outTexture,
kTopLeft_GrSurfaceOrigin, sampleCnt,
+ kRGBA_8888_SkColorType,
nullptr, nullptr);
if (!surface) {
context->getGpu()->deleteTestingOnlyBackendTexture(outTexture);
@@ -621,7 +622,8 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture_as_render_target(
}
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTextureAsRenderTarget(
- context, *outTexture, kTopLeft_GrSurfaceOrigin, sampleCnt, nullptr, nullptr);
+ context, *outTexture, kTopLeft_GrSurfaceOrigin, sampleCnt, kRGBA_8888_SkColorType,
+ nullptr, nullptr);
if (!surface) {
context->getGpu()->deleteTestingOnlyBackendTexture(outTexture);
@@ -894,6 +896,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter,
return SkSurface::MakeFromBackendTexture(context, backendTex,
kTopLeft_GrSurfaceOrigin, 0,
+ info.colorType(),
sk_ref_sp(info.colorSpace()), nullptr);
};