Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index b3604b999b3594dd57bed389ebece1e65227339c..de59caf14e24295a03cfbd742e200870db2bc583 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -253,6 +253,7 @@ static sk_sp<SkImage> make_from_yuv_textures_copy(GrContext* ctx, SkYUVColorSpac
sk_sp<GrDrawContext> drawContext(ctx->newDrawContext(SkBackingFit::kExact,
width, height,
kRGBA_8888_GrPixelConfig,
+ std::move(imageColorSpace),
0,
origin));
if (!drawContext) {
@@ -270,7 +271,7 @@ static sk_sp<SkImage> make_from_yuv_textures_copy(GrContext* ctx, SkYUVColorSpac
ctx->flushSurfaceWrites(drawContext->accessRenderTarget());
return sk_make_sp<SkImage_Gpu>(width, height, kNeedNewImageUniqueID,
kOpaque_SkAlphaType, drawContext->asTexture().get(),
- std::move(imageColorSpace), budgeted);
+ sk_ref_sp(drawContext->getColorSpace()), budgeted);
}
sk_sp<SkImage> SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace colorSpace,

Powered by Google App Engine
This is Rietveld 408576698