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

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, 10 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 if (should_have_render_surface) { 980 if (should_have_render_surface) {
981 render_surface_ = base::MakeUnique<RenderSurfaceImpl>(this); 981 render_surface_ = base::MakeUnique<RenderSurfaceImpl>(this);
982 return; 982 return;
983 } 983 }
984 render_surface_.reset(); 984 render_surface_.reset();
985 } 985 }
986 986
987 gfx::Transform LayerImpl::DrawTransform() const { 987 gfx::Transform LayerImpl::DrawTransform() const {
988 // Only drawn layers have up-to-date draw properties. 988 // Only drawn layers have up-to-date draw properties.
989 if (!is_drawn_render_surface_layer_list_member()) { 989 if (!is_drawn_render_surface_layer_list_member()) {
990 if (GetPropertyTrees()->non_root_surfaces_enabled) {
991 return draw_property_utils::DrawTransform(this, GetTransformTree(), 990 return draw_property_utils::DrawTransform(this, GetTransformTree(),
992 GetEffectTree()); 991 GetEffectTree());
993 } else {
994 return draw_property_utils::ScreenSpaceTransform(this,
995 GetTransformTree());
996 }
997 } 992 }
998 993
999 return draw_properties().target_space_transform; 994 return draw_properties().target_space_transform;
1000 } 995 }
1001 996
1002 gfx::Transform LayerImpl::ScreenSpaceTransform() const { 997 gfx::Transform LayerImpl::ScreenSpaceTransform() const {
1003 // Only drawn layers have up-to-date draw properties. 998 // Only drawn layers have up-to-date draw properties.
1004 if (!is_drawn_render_surface_layer_list_member()) { 999 if (!is_drawn_render_surface_layer_list_member()) {
1005 return draw_property_utils::ScreenSpaceTransform(this, GetTransformTree()); 1000 return draw_property_utils::ScreenSpaceTransform(this, GetTransformTree());
1006 } 1001 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 1092
1098 ScrollTree& LayerImpl::GetScrollTree() const { 1093 ScrollTree& LayerImpl::GetScrollTree() const {
1099 return GetPropertyTrees()->scroll_tree; 1094 return GetPropertyTrees()->scroll_tree;
1100 } 1095 }
1101 1096
1102 TransformTree& LayerImpl::GetTransformTree() const { 1097 TransformTree& LayerImpl::GetTransformTree() const {
1103 return GetPropertyTrees()->transform_tree; 1098 return GetPropertyTrees()->transform_tree;
1104 } 1099 }
1105 1100
1106 } // namespace cc 1101 } // 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