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

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

Issue 2194013002: cc: Delete the Renderer base class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dcheck-delegating
Patch Set: delete-renderer-base-class: rebase Created 4 years, 4 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_impl.h" 5 #include "cc/trees/layer_tree_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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 DidUpdateScrollState(inner_viewport_scroll_layer_id_); 823 DidUpdateScrollState(inner_viewport_scroll_layer_id_);
824 } 824 }
825 825
826 void LayerTreeImpl::SetDeviceScaleFactor(float device_scale_factor) { 826 void LayerTreeImpl::SetDeviceScaleFactor(float device_scale_factor) {
827 if (device_scale_factor == device_scale_factor_) 827 if (device_scale_factor == device_scale_factor_)
828 return; 828 return;
829 device_scale_factor_ = device_scale_factor; 829 device_scale_factor_ = device_scale_factor;
830 830
831 set_needs_update_draw_properties(); 831 set_needs_update_draw_properties();
832 if (IsActiveTree()) 832 if (IsActiveTree())
833 layer_tree_host_impl_->SetFullRootLayerDamage(); 833 layer_tree_host_impl_->SetFullViewportDamage();
834 } 834 }
835 835
836 SyncedProperty<ScaleGroup>* LayerTreeImpl::page_scale_factor() { 836 SyncedProperty<ScaleGroup>* LayerTreeImpl::page_scale_factor() {
837 return page_scale_factor_.get(); 837 return page_scale_factor_.get();
838 } 838 }
839 839
840 const SyncedProperty<ScaleGroup>* LayerTreeImpl::page_scale_factor() const { 840 const SyncedProperty<ScaleGroup>* LayerTreeImpl::page_scale_factor() const {
841 return page_scale_factor_.get(); 841 return page_scale_factor_.get();
842 } 842 }
843 843
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 } 1194 }
1195 return nullptr; 1195 return nullptr;
1196 } 1196 }
1197 1197
1198 size_t LayerTreeImpl::NumLayers() { 1198 size_t LayerTreeImpl::NumLayers() {
1199 return layer_id_map_.size(); 1199 return layer_id_map_.size();
1200 } 1200 }
1201 1201
1202 void LayerTreeImpl::DidBecomeActive() { 1202 void LayerTreeImpl::DidBecomeActive() {
1203 if (next_activation_forces_redraw_) { 1203 if (next_activation_forces_redraw_) {
1204 layer_tree_host_impl_->SetFullRootLayerDamage(); 1204 layer_tree_host_impl_->SetFullViewportDamage();
1205 next_activation_forces_redraw_ = false; 1205 next_activation_forces_redraw_ = false;
1206 } 1206 }
1207 1207
1208 // Always reset this flag on activation, as we would only have activated 1208 // Always reset this flag on activation, as we would only have activated
1209 // if we were in a good state. 1209 // if we were in a good state.
1210 layer_tree_host_impl_->ResetRequiresHighResToDraw(); 1210 layer_tree_host_impl_->ResetRequiresHighResToDraw();
1211 1211
1212 if (!layer_list_.empty()) { 1212 if (!layer_list_.empty()) {
1213 LayerTreeHostCommon::CallFunctionForEveryLayer( 1213 LayerTreeHostCommon::CallFunctionForEveryLayer(
1214 this, [](LayerImpl* layer) { layer->DidBecomeActive(); }); 1214 this, [](LayerImpl* layer) { layer->DidBecomeActive(); });
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2033
2034 void LayerTreeImpl::ResetAllChangeTracking() { 2034 void LayerTreeImpl::ResetAllChangeTracking() {
2035 layers_that_should_push_properties_.clear(); 2035 layers_that_should_push_properties_.clear();
2036 // Iterate over all layers, including masks and replicas. 2036 // Iterate over all layers, including masks and replicas.
2037 for (auto& layer : *layers_) 2037 for (auto& layer : *layers_)
2038 layer->ResetChangeTracking(); 2038 layer->ResetChangeTracking();
2039 property_trees_.ResetAllChangeTracking(); 2039 property_trees_.ResetAllChangeTracking();
2040 } 2040 }
2041 2041
2042 } // namespace cc 2042 } // namespace cc
OLDNEW
« cc/output/gl_renderer.cc ('K') | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698