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

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

Issue 453533002: cc: Remove unused arguments from CalculateContentsScale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/test/tiled_layer_test_common.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/painted_scrollbar_layer.h" 5 #include "cc/layers/painted_scrollbar_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/layers/painted_scrollbar_layer_impl.h" 10 #include "cc/layers/painted_scrollbar_layer_impl.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (scaled_bounds.width() > scaled_bounds.height()) 91 if (scaled_bounds.width() > scaled_bounds.height())
92 return (MaxTextureSize() - 1) / static_cast<float>(bounds().width()); 92 return (MaxTextureSize() - 1) / static_cast<float>(bounds().width());
93 else 93 else
94 return (MaxTextureSize() - 1) / static_cast<float>(bounds().height()); 94 return (MaxTextureSize() - 1) / static_cast<float>(bounds().height());
95 } 95 }
96 return scale; 96 return scale;
97 } 97 }
98 98
99 void PaintedScrollbarLayer::CalculateContentsScale( 99 void PaintedScrollbarLayer::CalculateContentsScale(
100 float ideal_contents_scale, 100 float ideal_contents_scale,
101 float device_scale_factor,
102 float page_scale_factor,
103 float maximum_animation_contents_scale,
104 bool animating_transform_to_screen,
105 float* contents_scale_x, 101 float* contents_scale_x,
106 float* contents_scale_y, 102 float* contents_scale_y,
107 gfx::Size* content_bounds) { 103 gfx::Size* content_bounds) {
108 ContentsScalingLayer::CalculateContentsScale( 104 ContentsScalingLayer::CalculateContentsScale(
109 ClampScaleToMaxTextureSize(ideal_contents_scale), 105 ClampScaleToMaxTextureSize(ideal_contents_scale),
110 device_scale_factor,
111 page_scale_factor,
112 maximum_animation_contents_scale,
113 animating_transform_to_screen,
114 contents_scale_x, 106 contents_scale_x,
115 contents_scale_y, 107 contents_scale_y,
116 content_bounds); 108 content_bounds);
117 } 109 }
118 110
119 void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { 111 void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
120 ContentsScalingLayer::PushPropertiesTo(layer); 112 ContentsScalingLayer::PushPropertiesTo(layer);
121 113
122 PushScrollClipPropertiesTo(layer); 114 PushScrollClipPropertiesTo(layer);
123 115
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 263
272 scrollbar_->PaintPart(&skcanvas, part, layer_rect); 264 scrollbar_->PaintPart(&skcanvas, part, layer_rect);
273 // Make sure that the pixels are no longer mutable to unavoid unnecessary 265 // Make sure that the pixels are no longer mutable to unavoid unnecessary
274 // allocation and copying. 266 // allocation and copying.
275 skbitmap.setImmutable(); 267 skbitmap.setImmutable();
276 268
277 return UIResourceBitmap(skbitmap); 269 return UIResourceBitmap(skbitmap);
278 } 270 }
279 271
280 } // namespace cc 272 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/test/tiled_layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698