| Index: cc/scrollbar_layer_impl.cc
|
| diff --git a/cc/scrollbar_layer_impl.cc b/cc/scrollbar_layer_impl.cc
|
| index fcb8f38265b5b4b7b56aaed89d681fdb430565ad..b3d8899af65e5a7bba3b3764956c68690af416ef 100644
|
| --- a/cc/scrollbar_layer_impl.cc
|
| +++ b/cc/scrollbar_layer_impl.cc
|
| @@ -66,19 +66,18 @@ void ScrollbarLayerImpl::setScrollbarData(WebScrollbar* scrollbar)
|
| m_geometry->update(scrollbar);
|
| }
|
|
|
| -static FloatRect toUVRect(const WebRect& r, const IntRect& bounds)
|
| +static gfx::RectF toUVRect(const gfx::Rect& r, const gfx::Rect& bounds)
|
| {
|
| - return FloatRect(static_cast<float>(r.x) / bounds.width(), static_cast<float>(r.y) / bounds.height(),
|
| - static_cast<float>(r.width) / bounds.width(), static_cast<float>(r.height) / bounds.height());
|
| + return gfx::ScaleRect(r, 1.0 / bounds.width(), 1.0 / bounds.height());
|
| }
|
|
|
| void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData)
|
| {
|
| bool premultipledAlpha = false;
|
| bool flipped = false;
|
| - FloatRect uvRect(0, 0, 1, 1);
|
| - IntRect boundsRect(IntPoint(), bounds());
|
| - IntRect contentBoundsRect(IntPoint(), contentBounds());
|
| + gfx::RectF uvRect(0, 0, 1, 1);
|
| + gfx::Rect boundsRect(gfx::Point(), bounds());
|
| + gfx::Rect contentBoundsRect(gfx::Point(), contentBounds());
|
|
|
| SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQuadState());
|
| appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
|
| @@ -103,8 +102,8 @@ void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& append
|
|
|
| // Order matters here: since the back track texture is being drawn to the entire contents rect, we must append it after the thumb and
|
| // fore track quads. The back track texture contains (and displays) the buttons.
|
| - if (!contentBoundsRect.isEmpty())
|
| - quadSink.append(TextureDrawQuad::create(sharedQuadState, IntRect(contentBoundsRect), m_backTrackResourceId, premultipledAlpha, uvRect, flipped).PassAs<DrawQuad>(), appendQuadsData);
|
| + if (!contentBoundsRect.IsEmpty())
|
| + quadSink.append(TextureDrawQuad::create(sharedQuadState, gfx::Rect(contentBoundsRect), m_backTrackResourceId, premultipledAlpha, uvRect, flipped).PassAs<DrawQuad>(), appendQuadsData);
|
| }
|
|
|
| void ScrollbarLayerImpl::didLoseContext()
|
|
|