From ae290fc83770ed29efdf2a66c2a1835ae4e669f8 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Tue, 3 Dec 2019 17:34:48 +0000 Subject: [PATCH] SharedImageAHB: create SkSurface with right color space. Bug: 1012401 Change-Id: I579ae08f993073049b9677e90efc42239cd76490 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948521 Reviewed-by: Vasiliy Telezhnikov Commit-Queue: Peng Huang Cr-Commit-Position: refs/heads/master@{#721047} --- .../service/shared_image_backing_factory_ahardwarebuffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc index cb295625979b69..b3aa8b6ae7202d 100644 --- a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc +++ b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc @@ -291,8 +291,8 @@ class SharedImageRepresentationSkiaVkAHB /*gpu_compositing=*/true, format()); auto surface = SkSurface::MakeFromBackendTextureAsRenderTarget( context_state_->gr_context(), promise_texture_->backendTexture(), - kTopLeft_GrSurfaceOrigin, final_msaa_count, sk_color_type, nullptr, - &surface_props); + kTopLeft_GrSurfaceOrigin, final_msaa_count, sk_color_type, + color_space().ToSkColorSpace(), &surface_props); DCHECK(surface); surface_ = surface.get(); return surface;