| 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 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( | 1322 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( |
| 1323 bool is_likely_to_require_a_draw) { | 1323 bool is_likely_to_require_a_draw) { |
| 1324 // Proactively tell the scheduler that we expect to draw within each vsync | 1324 // Proactively tell the scheduler that we expect to draw within each vsync |
| 1325 // until we get all the tiles ready to draw. If we happen to miss a required | 1325 // until we get all the tiles ready to draw. If we happen to miss a required |
| 1326 // for draw tile here, then we will miss telling the scheduler each frame that | 1326 // for draw tile here, then we will miss telling the scheduler each frame that |
| 1327 // we intend to draw so it may make worse scheduling decisions. | 1327 // we intend to draw so it may make worse scheduling decisions. |
| 1328 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; | 1328 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { | 1331 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { |
| 1332 if (!settings_.enable_color_correct_rasterization) |
| 1333 return gfx::ColorSpace(); |
| 1332 if (!sync_tree()) | 1334 if (!sync_tree()) |
| 1333 return gfx::ColorSpace::CreateSRGB(); | 1335 return gfx::ColorSpace::CreateSRGB(); |
| 1334 return sync_tree()->raster_color_space(); | 1336 return sync_tree()->raster_color_space(); |
| 1335 } | 1337 } |
| 1336 | 1338 |
| 1337 void LayerTreeHostImpl::RequestImplSideInvalidation() { | 1339 void LayerTreeHostImpl::RequestImplSideInvalidation() { |
| 1338 client_->NeedsImplSideInvalidation(); | 1340 client_->NeedsImplSideInvalidation(); |
| 1339 } | 1341 } |
| 1340 | 1342 |
| 1341 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1343 void LayerTreeHostImpl::NotifyReadyToActivate() { |
| (...skipping 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4255 } | 4257 } |
| 4256 | 4258 |
| 4257 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4259 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
| 4258 if (is_wheel_scroll) | 4260 if (is_wheel_scroll) |
| 4259 has_scrolled_by_wheel_ = true; | 4261 has_scrolled_by_wheel_ = true; |
| 4260 else | 4262 else |
| 4261 has_scrolled_by_touch_ = true; | 4263 has_scrolled_by_touch_ = true; |
| 4262 } | 4264 } |
| 4263 | 4265 |
| 4264 } // namespace cc | 4266 } // namespace cc |
| OLD | NEW |