summaryrefslogtreecommitdiffstats
path: root/cc/scrollbar_layer_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/scrollbar_layer_impl.cc')
-rw-r--r--cc/scrollbar_layer_impl.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/cc/scrollbar_layer_impl.cc b/cc/scrollbar_layer_impl.cc
index 67344ce..a42ff17 100644
--- a/cc/scrollbar_layer_impl.cc
+++ b/cc/scrollbar_layer_impl.cc
@@ -117,8 +117,7 @@ void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& append
{
bool premultipledAlpha = false;
bool flipped = false;
- gfx::PointF uvTopLeft(0.f, 0.f);
- gfx::PointF uvBottomRight(1.f, 1.f);
+ gfx::RectF uvRect(0, 0, 1, 1);
gfx::Rect boundsRect(gfx::Point(), bounds());
gfx::Rect contentBoundsRect(gfx::Point(), contentBounds());
@@ -135,7 +134,7 @@ void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& append
gfx::Rect opaqueRect;
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_thumbResourceId, premultipledAlpha, uvTopLeft, uvBottomRight, opacity, flipped);
+ quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_thumbResourceId, premultipledAlpha, uvRect, opacity, flipped);
quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
}
@@ -146,10 +145,9 @@ void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& append
if (m_foreTrackResourceId && !foreTrackRect.isEmpty()) {
gfx::Rect quadRect(scrollbarLayerRectToContentRect(foreTrackRect));
gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
- gfx::RectF uvRect(toUVRect(foreTrackRect, boundsRect));
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_foreTrackResourceId, premultipledAlpha, uvRect.origin(), uvRect.bottom_right(), opacity, flipped);
+ quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_foreTrackResourceId, premultipledAlpha, toUVRect(foreTrackRect, boundsRect), opacity, flipped);
quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
}
@@ -160,7 +158,7 @@ void ScrollbarLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& append
gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_backTrackResourceId, premultipledAlpha, uvTopLeft, uvBottomRight, opacity, flipped);
+ quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_backTrackResourceId, premultipledAlpha, uvRect, opacity, flipped);
quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
}
}