aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-04-19 10:28:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-19 15:02:34 +0000
commit57bf4a3dbf01f11d3f2ec2e1952388220bef50be (patch)
treef1b314e6fcb32cf95419f592216e0e1ce90498c4 /dm
parentbc54533b2b2c6dddd182806a0dc0dd012e7139e2 (diff)
When creating testing backendTexture take colorspace into account.
Bug: skia: Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9 Reviewed-on: https://skia-review.googlesource.com/122341 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 9829e2978d..a086094414 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1510,7 +1510,8 @@ Error GPUSink::onDraw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log,
break;
case SkCommandLineConfigGpu::SurfType::kBackendTexture:
backendTexture = context->contextPriv().getGpu()->createTestingOnlyBackendTexture(
- nullptr, info.width(), info.height(), info.colorType(), true, GrMipMapped::kNo);
+ nullptr, info.width(), info.height(), info.colorType(), info.colorSpace(),
+ true, GrMipMapped::kNo);
surface = SkSurface::MakeFromBackendTexture(context, backendTexture,
kTopLeft_GrSurfaceOrigin, fSampleCount,
fColorType, info.refColorSpace(), &props);
@@ -2107,6 +2108,7 @@ public:
info.fBitmap.width(),
info.fBitmap.height(),
info.fBitmap.colorType(),
+ info.fBitmap.colorSpace(),
false, GrMipMapped::kNo));
// The GMs sometimes request too large an image
//SkAssertResult(callbackContext->backendTexture().isValid());