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

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

Issue 2735943002: cc: Clarify that color spaces are for raster (Closed)
Patch Set: Rebase (a few times) Created 3 years, 9 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "cc/trees/layer_tree_host.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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 957
958 void LayerTreeHost::SetPaintedDeviceScaleFactor( 958 void LayerTreeHost::SetPaintedDeviceScaleFactor(
959 float painted_device_scale_factor) { 959 float painted_device_scale_factor) {
960 if (painted_device_scale_factor_ == painted_device_scale_factor) 960 if (painted_device_scale_factor_ == painted_device_scale_factor)
961 return; 961 return;
962 painted_device_scale_factor_ = painted_device_scale_factor; 962 painted_device_scale_factor_ = painted_device_scale_factor;
963 963
964 SetNeedsCommit(); 964 SetNeedsCommit();
965 } 965 }
966 966
967 void LayerTreeHost::SetDeviceColorSpace( 967 void LayerTreeHost::SetRasterColorSpace(
968 const gfx::ColorSpace& device_color_space) { 968 const gfx::ColorSpace& raster_color_space) {
969 if (device_color_space_ == device_color_space) 969 if (raster_color_space_ == raster_color_space)
970 return; 970 return;
971 device_color_space_ = device_color_space; 971 raster_color_space_ = raster_color_space;
972 LayerTreeHostCommon::CallFunctionForEveryLayer( 972 LayerTreeHostCommon::CallFunctionForEveryLayer(
973 this, [](Layer* layer) { layer->SetNeedsDisplay(); }); 973 this, [](Layer* layer) { layer->SetNeedsDisplay(); });
974 } 974 }
975 975
976 void LayerTreeHost::SetContentSourceId(uint32_t id) { 976 void LayerTreeHost::SetContentSourceId(uint32_t id) {
977 if (content_source_id_ == id) 977 if (content_source_id_ == id)
978 return; 978 return;
979 content_source_id_ = id; 979 content_source_id_ = id;
980 SetNeedsCommit(); 980 SetNeedsCommit();
981 } 981 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 browser_controls_shrink_blink_size_); 1141 browser_controls_shrink_blink_size_);
1142 tree_impl->set_top_controls_height(top_controls_height_); 1142 tree_impl->set_top_controls_height(top_controls_height_);
1143 tree_impl->set_bottom_controls_height(bottom_controls_height_); 1143 tree_impl->set_bottom_controls_height(bottom_controls_height_);
1144 tree_impl->PushBrowserControlsFromMainThread(top_controls_shown_ratio_); 1144 tree_impl->PushBrowserControlsFromMainThread(top_controls_shown_ratio_);
1145 tree_impl->elastic_overscroll()->PushFromMainThread(elastic_overscroll_); 1145 tree_impl->elastic_overscroll()->PushFromMainThread(elastic_overscroll_);
1146 if (tree_impl->IsActiveTree()) 1146 if (tree_impl->IsActiveTree())
1147 tree_impl->elastic_overscroll()->PushPendingToActive(); 1147 tree_impl->elastic_overscroll()->PushPendingToActive();
1148 1148
1149 tree_impl->set_painted_device_scale_factor(painted_device_scale_factor_); 1149 tree_impl->set_painted_device_scale_factor(painted_device_scale_factor_);
1150 1150
1151 tree_impl->SetDeviceColorSpace(device_color_space_); 1151 tree_impl->SetRasterColorSpace(raster_color_space_);
1152 1152
1153 tree_impl->set_content_source_id(content_source_id_); 1153 tree_impl->set_content_source_id(content_source_id_);
1154 1154
1155 if (pending_page_scale_animation_) { 1155 if (pending_page_scale_animation_) {
1156 tree_impl->SetPendingPageScaleAnimation( 1156 tree_impl->SetPendingPageScaleAnimation(
1157 std::move(pending_page_scale_animation_)); 1157 std::move(pending_page_scale_animation_));
1158 } 1158 }
1159 1159
1160 DCHECK(!tree_impl->ViewportSizeInvalid()); 1160 DCHECK(!tree_impl->ViewportSizeInvalid());
1161 1161
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 LayerListReverseIterator<Layer> LayerTreeHost::rend() { 1318 LayerListReverseIterator<Layer> LayerTreeHost::rend() {
1319 return LayerListReverseIterator<Layer>(nullptr); 1319 return LayerListReverseIterator<Layer>(nullptr);
1320 } 1320 }
1321 1321
1322 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { 1322 void LayerTreeHost::SetNeedsDisplayOnAllLayers() {
1323 for (auto* layer : *this) 1323 for (auto* layer : *this)
1324 layer->SetNeedsDisplay(); 1324 layer->SetNeedsDisplay();
1325 } 1325 }
1326 1326
1327 } // namespace cc 1327 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698