Commit 1e9317e4 authored by Weiliang Chen's avatar Weiliang Chen Committed by Commit Bot

SkiaRenderer: Add Color Space to SkiaOutputDeviceOffscreen

SkiaOutputDeviceOffscreen is not using the color space that is passed
in.

Bug: 957040
Change-Id: I51bfa5c8ee890abe960d0059ec71c54823abb252
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586345Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Commit-Queue: weiliangc <weiliangc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656407}
parent 4e568393
......@@ -33,7 +33,8 @@ void SkiaOutputDeviceOffscreen::Reshape(const gfx::Size& size,
// kRGBA_8888_SkColorType instead and initialize surface to opaque alpha.
image_info_ =
SkImageInfo::Make(size.width(), size.height(), kRGBA_8888_SkColorType,
has_alpha_ ? kPremul_SkAlphaType : kOpaque_SkAlphaType);
has_alpha_ ? kPremul_SkAlphaType : kOpaque_SkAlphaType,
color_space.ToSkColorSpace());
draw_surface_ = SkSurface::MakeRenderTarget(
gr_context_, SkBudgeted::kNo, image_info_, 0 /* sampleCount */,
capabilities_.flipped_output_surface ? kTopLeft_GrSurfaceOrigin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment