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

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

Issue 2693703010: cc: Remove support for disabling non-root render surfaces. (Closed)
Patch Set: softwaredraw-remove-no-surfaces: rebase Created 3 years, 7 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/output/bsp_tree_perftest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_impl.h" 5 #include "cc/layers/layer_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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 860
861 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } 861 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; }
862 862
863 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 863 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
864 benchmark->RunOnLayer(this); 864 benchmark->RunOnLayer(this);
865 } 865 }
866 866
867 gfx::Transform LayerImpl::DrawTransform() const { 867 gfx::Transform LayerImpl::DrawTransform() const {
868 // Only drawn layers have up-to-date draw properties. 868 // Only drawn layers have up-to-date draw properties.
869 if (!contributes_to_drawn_render_surface()) { 869 if (!contributes_to_drawn_render_surface()) {
870 if (GetPropertyTrees()->non_root_surfaces_enabled) {
871 return draw_property_utils::DrawTransform(this, GetTransformTree(), 870 return draw_property_utils::DrawTransform(this, GetTransformTree(),
872 GetEffectTree()); 871 GetEffectTree());
873 } else {
874 return draw_property_utils::ScreenSpaceTransform(this,
875 GetTransformTree());
876 }
877 } 872 }
878 873
879 return draw_properties().target_space_transform; 874 return draw_properties().target_space_transform;
880 } 875 }
881 876
882 gfx::Transform LayerImpl::ScreenSpaceTransform() const { 877 gfx::Transform LayerImpl::ScreenSpaceTransform() const {
883 // Only drawn layers have up-to-date draw properties. 878 // Only drawn layers have up-to-date draw properties.
884 if (!contributes_to_drawn_render_surface()) { 879 if (!contributes_to_drawn_render_surface()) {
885 return draw_property_utils::ScreenSpaceTransform(this, GetTransformTree()); 880 return draw_property_utils::ScreenSpaceTransform(this, GetTransformTree());
886 } 881 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 967
973 ScrollTree& LayerImpl::GetScrollTree() const { 968 ScrollTree& LayerImpl::GetScrollTree() const {
974 return GetPropertyTrees()->scroll_tree; 969 return GetPropertyTrees()->scroll_tree;
975 } 970 }
976 971
977 TransformTree& LayerImpl::GetTransformTree() const { 972 TransformTree& LayerImpl::GetTransformTree() const {
978 return GetPropertyTrees()->transform_tree; 973 return GetPropertyTrees()->transform_tree;
979 } 974 }
980 975
981 } // namespace cc 976 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/bsp_tree_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698