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

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

Issue 1505243003: Revert of Create RenderSurface on Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alwayspt
Patch Set: rebase Created 5 years 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 | « cc/layers/layer.h ('k') | 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 <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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 #endif 1199 #endif
1200 1200
1201 layer->SetTransformTreeIndex(transform_tree_index()); 1201 layer->SetTransformTreeIndex(transform_tree_index());
1202 layer->SetEffectTreeIndex(effect_tree_index()); 1202 layer->SetEffectTreeIndex(effect_tree_index());
1203 layer->SetClipTreeIndex(clip_tree_index()); 1203 layer->SetClipTreeIndex(clip_tree_index());
1204 layer->set_offset_to_transform_parent(offset_to_transform_parent_); 1204 layer->set_offset_to_transform_parent(offset_to_transform_parent_);
1205 layer->SetDoubleSided(double_sided_); 1205 layer->SetDoubleSided(double_sided_);
1206 layer->SetDrawsContent(DrawsContent()); 1206 layer->SetDrawsContent(DrawsContent());
1207 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); 1207 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_);
1208 layer->SetHasRenderSurface(has_render_surface_); 1208 layer->SetHasRenderSurface(has_render_surface_);
1209 layer->SetForceRenderSurface(force_render_surface_);
1210 if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating()) 1209 if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating())
1211 layer->SetFilters(filters_); 1210 layer->SetFilters(filters_);
1212 DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly())); 1211 DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly()));
1213 layer->SetBackgroundFilters(background_filters()); 1212 layer->SetBackgroundFilters(background_filters());
1214 layer->SetMasksToBounds(masks_to_bounds_); 1213 layer->SetMasksToBounds(masks_to_bounds_);
1215 layer->SetShouldScrollOnMainThread(should_scroll_on_main_thread_); 1214 layer->SetShouldScrollOnMainThread(should_scroll_on_main_thread_);
1216 layer->SetHaveWheelEventHandlers(have_wheel_event_handlers_); 1215 layer->SetHaveWheelEventHandlers(have_wheel_event_handlers_);
1217 layer->SetHaveScrollEventHandlers(have_scroll_event_handlers_); 1216 layer->SetHaveScrollEventHandlers(have_scroll_event_handlers_);
1218 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); 1217 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_);
1219 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); 1218 layer->SetTouchEventHandlerRegion(touch_event_handler_region_);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 return client_->TakeDebugInfo(this); 1539 return client_->TakeDebugInfo(this);
1541 else 1540 else
1542 return nullptr; 1541 return nullptr;
1543 } 1542 }
1544 1543
1545 void Layer::SetHasRenderSurface(bool has_render_surface) { 1544 void Layer::SetHasRenderSurface(bool has_render_surface) {
1546 if (has_render_surface_ == has_render_surface) 1545 if (has_render_surface_ == has_render_surface)
1547 return; 1546 return;
1548 has_render_surface_ = has_render_surface; 1547 has_render_surface_ = has_render_surface;
1549 // We do not need SetNeedsCommit here, since this is only ever called 1548 // We do not need SetNeedsCommit here, since this is only ever called
1550 // during a commit, from CalculateDrawProperties using property trees. 1549 // during a commit, from CalculateDrawProperties.
1551 SetNeedsPushProperties(); 1550 SetNeedsPushProperties();
1551 layer_tree_host_->property_trees()->needs_rebuild = true;
1552 } 1552 }
1553 1553
1554 gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const { 1554 gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const {
1555 return CurrentScrollOffset(); 1555 return CurrentScrollOffset();
1556 } 1556 }
1557 1557
1558 // On<Property>Animated is called due to an ongoing accelerated animation. 1558 // On<Property>Animated is called due to an ongoing accelerated animation.
1559 // Since this animation is also being run on the compositor thread, there 1559 // Since this animation is also being run on the compositor thread, there
1560 // is no need to request a commit to push this value over, so the value is 1560 // is no need to request a commit to push this value over, so the value is
1561 // set directly rather than by calling Set<Property>. 1561 // set directly rather than by calling Set<Property>.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 this, layer_tree_host_->property_trees()->transform_tree); 1851 this, layer_tree_host_->property_trees()->transform_tree);
1852 } 1852 }
1853 1853
1854 gfx::Transform Layer::screen_space_transform() const { 1854 gfx::Transform Layer::screen_space_transform() const {
1855 DCHECK_NE(transform_tree_index_, -1); 1855 DCHECK_NE(transform_tree_index_, -1);
1856 return ScreenSpaceTransformFromPropertyTrees( 1856 return ScreenSpaceTransformFromPropertyTrees(
1857 this, layer_tree_host_->property_trees()->transform_tree); 1857 this, layer_tree_host_->property_trees()->transform_tree);
1858 } 1858 }
1859 1859
1860 } // namespace cc 1860 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698