aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-06-24 09:22:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-24 09:22:31 -0700
commit0a3a7f7303273151f1585b3cf5f6968e3932bfed (patch)
tree0ebb99df525622a8a398be5ca77de35590f8e030 /tests/SurfaceTest.cpp
parente074d1fa6ace83dd77971b971c07166bedeb28ef (diff)
Have gpu createTestingOlyBackendTexture know if it is a render target or not
In Vulkan we need to know at create time of a texture whether or not we will use it as a render target. BUG=skia:5458 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2093943002 Review-Url: https://codereview.chromium.org/2093943002
Diffstat (limited to 'tests/SurfaceTest.cpp')
-rw-r--r--tests/SurfaceTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index bcfd0a9387..bf6445f00c 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -360,7 +360,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(UniqueImageSnapshot_Gpu, reporter, ctxInfo) {
// Test again with a "direct" render target;
GrBackendObject textureObject = context->getGpu()->createTestingOnlyBackendTexture(nullptr,
- 10, 10, kRGBA_8888_GrPixelConfig);
+ 10, 10, kRGBA_8888_GrPixelConfig, true);
GrBackendTextureDesc desc;
desc.fConfig = kRGBA_8888_GrPixelConfig;
desc.fWidth = 10;
@@ -764,7 +764,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture(
desc.fHeight = kHeight;
desc.fFlags = kRenderTarget_GrBackendTextureFlag;
desc.fTextureHandle = context->getGpu()->createTestingOnlyBackendTexture(
- pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig);
+ pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig, true);
desc.fSampleCnt = sampleCnt;
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTexture(context, desc, nullptr);
if (!surface) {
@@ -787,7 +787,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture_as_render_target(
desc.fHeight = kHeight;
desc.fFlags = kRenderTarget_GrBackendTextureFlag;
desc.fTextureHandle = context->getGpu()->createTestingOnlyBackendTexture(
- pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig);
+ pixels.get(), kWidth, kHeight, kRGBA_8888_GrPixelConfig, true);
desc.fSampleCnt = sampleCnt;
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTextureAsRenderTarget(context, desc,
nullptr);