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

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

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | cc/layers/layer_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 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1113
1114 void Layer::PushPropertiesTo(LayerImpl* layer) { 1114 void Layer::PushPropertiesTo(LayerImpl* layer) {
1115 TRACE_EVENT0("cc", "Layer::PushPropertiesTo"); 1115 TRACE_EVENT0("cc", "Layer::PushPropertiesTo");
1116 DCHECK(layer_tree_host_); 1116 DCHECK(layer_tree_host_);
1117 1117
1118 // If we did not SavePaintProperties() for the layer this frame, then push the 1118 // If we did not SavePaintProperties() for the layer this frame, then push the
1119 // real property values, not the paint property values. 1119 // real property values, not the paint property values.
1120 bool use_paint_properties = paint_properties_.source_frame_number == 1120 bool use_paint_properties = paint_properties_.source_frame_number ==
1121 layer_tree_host_->source_frame_number(); 1121 layer_tree_host_->source_frame_number();
1122 1122
1123 layer->SetTransformOrigin(transform_origin_);
1124 layer->SetBackgroundColor(background_color_); 1123 layer->SetBackgroundColor(background_color_);
1125 layer->SetSafeOpaqueBackgroundColor(safe_opaque_background_color_); 1124 layer->SetSafeOpaqueBackgroundColor(safe_opaque_background_color_);
1126 layer->SetBounds(use_paint_properties ? paint_properties_.bounds 1125 layer->SetBounds(use_paint_properties ? paint_properties_.bounds
1127 : bounds_); 1126 : bounds_);
1128 1127
1129 #if defined(NDEBUG) 1128 #if defined(NDEBUG)
1130 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) 1129 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots())
1131 layer->SetDebugInfo(TakeDebugInfo()); 1130 layer->SetDebugInfo(TakeDebugInfo());
1132 #else 1131 #else
1133 layer->SetDebugInfo(TakeDebugInfo()); 1132 layer->SetDebugInfo(TakeDebugInfo());
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 ->data.num_copy_requests_in_subtree; 1819 ->data.num_copy_requests_in_subtree;
1821 } 1820 }
1822 1821
1823 gfx::Transform Layer::screen_space_transform() const { 1822 gfx::Transform Layer::screen_space_transform() const {
1824 DCHECK_NE(transform_tree_index_, -1); 1823 DCHECK_NE(transform_tree_index_, -1);
1825 return draw_property_utils::ScreenSpaceTransform( 1824 return draw_property_utils::ScreenSpaceTransform(
1826 this, layer_tree_host_->property_trees()->transform_tree); 1825 this, layer_tree_host_->property_trees()->transform_tree);
1827 } 1826 }
1828 1827
1829 } // namespace cc 1828 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698