From 57bf4a3dbf01f11d3f2ec2e1952388220bef50be Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Thu, 19 Apr 2018 10:28:37 -0400 Subject: 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 Reviewed-by: Brian Osman Commit-Queue: Greg Daniel --- dm/DMSrcSink.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dm') 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()); -- cgit v1.2.3