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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2898583002: color: Fix color not being reset between layout tests (Closed)
Patch Set: Remove extra changes Created 3 years, 7 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 54dc7bbd336bc73f606cdad27254392eed83b148..c2368225e123ef67c53bcbe136c718332e44ccf6 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1352,11 +1352,14 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
}
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const {
+ gfx::ColorSpace result;
if (!settings_.enable_color_correct_rasterization)
- return gfx::ColorSpace();
- if (!sync_tree())
- return gfx::ColorSpace::CreateSRGB();
- return sync_tree()->raster_color_space();
+ return result;
+ if (sync_tree())
+ result = sync_tree()->raster_color_space();
enne (OOO) 2017/05/20 03:32:21 I realize you're not changing this here, but this
ccameron 2017/05/22 23:27:08 Oh, LTHI::sync_tree() returns return pending_tre
enne (OOO) 2017/05/23 00:13:43 Ok, you're correct that as written, sync tree will
ccameron 2017/05/23 06:28:39 Yeah, this doesn't have guarantees about when it w
+ if (!result.IsValid())
+ result = gfx::ColorSpace::CreateSRGB();
+ return result;
}
void LayerTreeHostImpl::RequestImplSideInvalidation() {
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698