| 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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( | 1312 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( |
| 1313 bool is_likely_to_require_a_draw) { | 1313 bool is_likely_to_require_a_draw) { |
| 1314 // Proactively tell the scheduler that we expect to draw within each vsync | 1314 // Proactively tell the scheduler that we expect to draw within each vsync |
| 1315 // until we get all the tiles ready to draw. If we happen to miss a required | 1315 // until we get all the tiles ready to draw. If we happen to miss a required |
| 1316 // for draw tile here, then we will miss telling the scheduler each frame that | 1316 // for draw tile here, then we will miss telling the scheduler each frame that |
| 1317 // we intend to draw so it may make worse scheduling decisions. | 1317 // we intend to draw so it may make worse scheduling decisions. |
| 1318 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; | 1318 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { | 1321 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { |
| 1322 if (!settings_.enable_color_correct_rasterization) |
| 1323 return gfx::ColorSpace(); |
| 1322 if (!sync_tree()) | 1324 if (!sync_tree()) |
| 1323 return gfx::ColorSpace::CreateSRGB(); | 1325 return gfx::ColorSpace::CreateSRGB(); |
| 1324 return sync_tree()->raster_color_space(); | 1326 return sync_tree()->raster_color_space(); |
| 1325 } | 1327 } |
| 1326 | 1328 |
| 1327 void LayerTreeHostImpl::RequestImplSideInvalidation() { | 1329 void LayerTreeHostImpl::RequestImplSideInvalidation() { |
| 1328 client_->NeedsImplSideInvalidation(); | 1330 client_->NeedsImplSideInvalidation(); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| 1331 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1333 void LayerTreeHostImpl::NotifyReadyToActivate() { |
| (...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4210 worker_context_visibility_ = | 4212 worker_context_visibility_ = |
| 4211 worker_context->CacheController()->ClientBecameVisible(); | 4213 worker_context->CacheController()->ClientBecameVisible(); |
| 4212 } else { | 4214 } else { |
| 4213 worker_context->CacheController()->ClientBecameNotVisible( | 4215 worker_context->CacheController()->ClientBecameNotVisible( |
| 4214 std::move(worker_context_visibility_)); | 4216 std::move(worker_context_visibility_)); |
| 4215 } | 4217 } |
| 4216 } | 4218 } |
| 4217 } | 4219 } |
| 4218 | 4220 |
| 4219 } // namespace cc | 4221 } // namespace cc |
| OLD | NEW |