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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Use suggested approach Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 1316
1317 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( 1317 void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
1318 bool is_likely_to_require_a_draw) { 1318 bool is_likely_to_require_a_draw) {
1319 // Proactively tell the scheduler that we expect to draw within each vsync 1319 // Proactively tell the scheduler that we expect to draw within each vsync
1320 // until we get all the tiles ready to draw. If we happen to miss a required 1320 // until we get all the tiles ready to draw. If we happen to miss a required
1321 // for draw tile here, then we will miss telling the scheduler each frame that 1321 // for draw tile here, then we will miss telling the scheduler each frame that
1322 // we intend to draw so it may make worse scheduling decisions. 1322 // we intend to draw so it may make worse scheduling decisions.
1323 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; 1323 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw;
1324 } 1324 }
1325 1325
1326 const gfx::ColorSpace& LayerTreeHostImpl::GetTileColorSpace() const {
1327 return sync_tree()->device_color_space();
ccameron 2016/09/13 23:34:16 I'd vaguely want to put the device_color_space han
vmpstr 2016/09/14 23:00:43 sync_tree might be nullptr, right? If we activate
ccameron 2016/09/15 07:13:42 I was planning to have this return a gfx::ColorSpa
1328 }
1329
1326 void LayerTreeHostImpl::NotifyReadyToActivate() { 1330 void LayerTreeHostImpl::NotifyReadyToActivate() {
1327 client_->NotifyReadyToActivate(); 1331 client_->NotifyReadyToActivate();
1328 } 1332 }
1329 1333
1330 void LayerTreeHostImpl::NotifyReadyToDraw() { 1334 void LayerTreeHostImpl::NotifyReadyToDraw() {
1331 // Tiles that are ready will cause NotifyTileStateChanged() to be called so we 1335 // Tiles that are ready will cause NotifyTileStateChanged() to be called so we
1332 // don't need to schedule a draw here. Just stop WillBeginImplFrame() from 1336 // don't need to schedule a draw here. Just stop WillBeginImplFrame() from
1333 // causing optimistic requests to draw a frame. 1337 // causing optimistic requests to draw a frame.
1334 is_likely_to_require_a_draw_ = false; 1338 is_likely_to_require_a_draw_ = false;
1335 1339
(...skipping 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after
4179 if (is_visible) { 4183 if (is_visible) {
4180 worker_context_visibility_ = 4184 worker_context_visibility_ =
4181 worker_context->CacheController()->ClientBecameVisible(); 4185 worker_context->CacheController()->ClientBecameVisible();
4182 } else { 4186 } else {
4183 worker_context->CacheController()->ClientBecameNotVisible( 4187 worker_context->CacheController()->ClientBecameNotVisible(
4184 std::move(worker_context_visibility_)); 4188 std::move(worker_context_visibility_));
4185 } 4189 }
4186 } 4190 }
4187 4191
4188 } // namespace cc 4192 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698