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

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

Issue 2468023002: Don't free non-tile resources on GPU rasterization toggle (Closed)
Patch Set: fix unittest Created 4 years, 1 month 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_impl.h ('k') | cc/layers/picture_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 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { 862 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const {
863 if (contents_opaque()) 863 if (contents_opaque())
864 return SimpleEnclosedRegion(visible_layer_rect()); 864 return SimpleEnclosedRegion(visible_layer_rect());
865 return SimpleEnclosedRegion(); 865 return SimpleEnclosedRegion();
866 } 866 }
867 867
868 void LayerImpl::DidBeginTracing() {} 868 void LayerImpl::DidBeginTracing() {}
869 869
870 void LayerImpl::ReleaseResources() {} 870 void LayerImpl::ReleaseResources() {}
871 871
872 void LayerImpl::RecreateResources() { 872 void LayerImpl::ReleaseTileResources() {}
873 } 873
874 void LayerImpl::RecreateTileResources() {}
874 875
875 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { 876 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const {
876 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset( 877 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset(
877 scroll_tree_index()); 878 scroll_tree_index());
878 } 879 }
879 880
880 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits( 881 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits(
881 gfx::ScrollOffset offset) const { 882 gfx::ScrollOffset offset) const {
882 offset.SetToMin(MaxScrollOffset()); 883 offset.SetToMin(MaxScrollOffset());
883 offset.SetToMax(gfx::ScrollOffset()); 884 offset.SetToMax(gfx::ScrollOffset());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 .layer_transforms_should_scale_layer_contents) { 1100 .layer_transforms_should_scale_layer_contents) {
1100 return default_scale; 1101 return default_scale;
1101 } 1102 }
1102 1103
1103 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1104 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1104 ScreenSpaceTransform(), default_scale); 1105 ScreenSpaceTransform(), default_scale);
1105 return std::max(transform_scales.x(), transform_scales.y()); 1106 return std::max(transform_scales.x(), transform_scales.y());
1106 } 1107 }
1107 1108
1108 } // namespace cc 1109 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698