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

Unified Diff: cc/resources/resource_provider.cc

Issue 2727063002: cc: Specify rasterization color space (Closed)
Patch Set: Add comment Created 3 years, 10 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index f5b71710b8788eefcffd0197b9a7214bb6c552a6..c3d25057c9f82e03a7ab51e4b0d934064e58c63b 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -884,7 +884,10 @@ sk_sp<SkColorSpace> ResourceProvider::GetResourceSkColorSpace(
const Resource* resource) const {
if (!settings_.enable_color_correct_rendering)
return nullptr;
- return resource->color_space.ToSkColorSpace();
+ // Returning the nonlinear blended color space matches the expectation of the
+ // web that colors are blended in the output color space, not in a
+ // physically-based linear space.
+ return resource->color_space.ToNonlinearBlendedSkColorSpace();
}
void ResourceProvider::CopyToResource(ResourceId id,
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698