OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( | 1339 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( |
1340 bool is_likely_to_require_a_draw) { | 1340 bool is_likely_to_require_a_draw) { |
1341 // Proactively tell the scheduler that we expect to draw within each vsync | 1341 // Proactively tell the scheduler that we expect to draw within each vsync |
1342 // until we get all the tiles ready to draw. If we happen to miss a required | 1342 // until we get all the tiles ready to draw. If we happen to miss a required |
1343 // for draw tile here, then we will miss telling the scheduler each frame that | 1343 // for draw tile here, then we will miss telling the scheduler each frame that |
1344 // we intend to draw so it may make worse scheduling decisions. | 1344 // we intend to draw so it may make worse scheduling decisions. |
1345 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; | 1345 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; |
1346 } | 1346 } |
1347 | 1347 |
1348 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { | 1348 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { |
| 1349 if (!settings_.enable_color_correct_rasterization) |
| 1350 return gfx::ColorSpace(); |
1349 if (!sync_tree()) | 1351 if (!sync_tree()) |
1350 return gfx::ColorSpace::CreateSRGB(); | 1352 return gfx::ColorSpace::CreateSRGB(); |
1351 return sync_tree()->raster_color_space(); | 1353 return sync_tree()->raster_color_space(); |
1352 } | 1354 } |
1353 | 1355 |
1354 void LayerTreeHostImpl::RequestImplSideInvalidation() { | 1356 void LayerTreeHostImpl::RequestImplSideInvalidation() { |
1355 client_->NeedsImplSideInvalidation(); | 1357 client_->NeedsImplSideInvalidation(); |
1356 } | 1358 } |
1357 | 1359 |
1358 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1360 void LayerTreeHostImpl::NotifyReadyToActivate() { |
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4277 } | 4279 } |
4278 | 4280 |
4279 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4281 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
4280 if (is_wheel_scroll) | 4282 if (is_wheel_scroll) |
4281 has_scrolled_by_wheel_ = true; | 4283 has_scrolled_by_wheel_ = true; |
4282 else | 4284 else |
4283 has_scrolled_by_touch_ = true; | 4285 has_scrolled_by_touch_ = true; |
4284 } | 4286 } |
4285 | 4287 |
4286 } // namespace cc | 4288 } // namespace cc |
OLD | NEW |