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

Side by Side Diff: cc/layers/layer.cc

Issue 1166613003: cc: Change Layer::PushProps conditional to say what it means (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 bool use_paint_properties = paint_properties_.source_frame_number == 1143 bool use_paint_properties = paint_properties_.source_frame_number ==
1144 layer_tree_host_->source_frame_number(); 1144 layer_tree_host_->source_frame_number();
1145 1145
1146 layer->SetTransformOrigin(transform_origin_); 1146 layer->SetTransformOrigin(transform_origin_);
1147 layer->SetBackgroundColor(background_color_); 1147 layer->SetBackgroundColor(background_color_);
1148 layer->SetBounds(use_paint_properties ? paint_properties_.bounds 1148 layer->SetBounds(use_paint_properties ? paint_properties_.bounds
1149 : bounds_); 1149 : bounds_);
1150 1150
1151 // TODO(enne): This is needed because CDP does this. Once main thread CDP 1151 // TODO(enne): This is needed because CDP does this. Once main thread CDP
1152 // goes away, content scale / bounds can be removed. 1152 // goes away, content scale / bounds can be removed.
1153 if (layer_tree_host()->settings().impl_side_painting) { 1153 if (layer_tree_host()->using_only_property_trees()) {
1154 layer->SetContentsScale(1.f, 1.f); 1154 layer->SetContentsScale(1.f, 1.f);
1155 layer->SetContentBounds(bounds()); 1155 layer->SetContentBounds(bounds());
1156 } else { 1156 } else {
1157 layer->SetContentBounds(content_bounds()); 1157 layer->SetContentBounds(content_bounds());
1158 layer->SetContentsScale(contents_scale_x(), contents_scale_y()); 1158 layer->SetContentsScale(contents_scale_x(), contents_scale_y());
1159 } 1159 }
1160 1160
1161 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) 1161 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots())
1162 layer->SetDebugInfo(TakeDebugInfo()); 1162 layer->SetDebugInfo(TakeDebugInfo());
1163 1163
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 ? layer_tree_host()->meta_information_sequence_number() 1647 ? layer_tree_host()->meta_information_sequence_number()
1648 : 0; 1648 : 0;
1649 } 1649 }
1650 1650
1651 bool Layer::sorted_for_recursion() { 1651 bool Layer::sorted_for_recursion() {
1652 return sorted_for_recursion_tracker_ == 1652 return sorted_for_recursion_tracker_ ==
1653 layer_tree_host()->meta_information_sequence_number(); 1653 layer_tree_host()->meta_information_sequence_number();
1654 } 1654 }
1655 1655
1656 } // namespace cc 1656 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698