Index: cc/layers/painted_scrollbar_layer.cc |
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc |
index e10947b3dc6864920a0295cdeee87bc5c4798253..aa544ea0db9004330ab01dbce0c557fc848316db 100644 |
--- a/cc/layers/painted_scrollbar_layer.cc |
+++ b/cc/layers/painted_scrollbar_layer.cc |
@@ -78,26 +78,6 @@ ScrollbarOrientation PaintedScrollbarLayer::orientation() const { |
return scrollbar_->Orientation(); |
} |
-int PaintedScrollbarLayer::MaxTextureSize() { |
- DCHECK(layer_tree_host()); |
- return layer_tree_host()->GetRendererCapabilities().max_texture_size; |
-} |
- |
-float PaintedScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { |
- // If the scaled bounds() is bigger than the max texture size of the |
- // device, we need to clamp it by rescaling, since this is used |
- // below to set the texture size. |
- gfx::Size scaled_bounds = gfx::ScaleToCeiledSize(bounds(), scale); |
- if (scaled_bounds.width() > MaxTextureSize() || |
- scaled_bounds.height() > MaxTextureSize()) { |
- if (bounds().width() > bounds().height()) |
- return (MaxTextureSize() - 1) / static_cast<float>(bounds().width()); |
- else |
- return (MaxTextureSize() - 1) / static_cast<float>(bounds().height()); |
- } |
- return scale; |
-} |
- |
void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
Layer::PushPropertiesTo(layer); |
@@ -202,8 +182,7 @@ void PaintedScrollbarLayer::UpdateInternalContentScale() { |
scale = std::max(transform_scales.x(), transform_scales.y()); |
} |
bool changed = false; |
- changed |= UpdateProperty(ClampScaleToMaxTextureSize(scale), |
- &internal_contents_scale_); |
+ changed |= UpdateProperty(scale, &internal_contents_scale_); |
changed |= |
UpdateProperty(gfx::ScaleToCeiledSize(bounds(), internal_contents_scale_), |
&internal_content_bounds_); |