Chromium Code Reviews| 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() { |