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

Unified Diff: cc/scrollbar_layer.cc

Issue 11266030: Use gfx:: Geometry types for the resource provider and layer updater classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint8 Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resource_update_controller_unittest.cc ('k') | cc/skpicture_content_layer_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_layer.cc
diff --git a/cc/scrollbar_layer.cc b/cc/scrollbar_layer.cc
index 1a107bd810ef9b4d50c844266016a588d0882b2f..baecc14cdad1084785b8720e7f64d3f85ae24b02 100644
--- a/cc/scrollbar_layer.cc
+++ b/cc/scrollbar_layer.cc
@@ -80,12 +80,11 @@ public:
return make_scoped_ptr(new ScrollbarBackgroundPainter(scrollbar, painter, geometry, trackPart));
}
- virtual void paint(SkCanvas* skCanvas, const IntRect& contentRect, FloatRect&) OVERRIDE
+ virtual void paint(SkCanvas* skCanvas, const gfx::Rect& contentRect, gfx::RectF&) OVERRIDE
{
WebKit::WebCanvas* canvas = skCanvas;
// The following is a simplification of ScrollbarThemeComposite::paint.
- WebKit::WebRect contentWebRect(contentRect.x(), contentRect.y(), contentRect.width(), contentRect.height());
- m_painter.paintScrollbarBackground(canvas, contentWebRect);
+ m_painter.paintScrollbarBackground(canvas, contentRect);
if (m_geometry->hasButtons(m_scrollbar)) {
WebRect backButtonStartPaintRect = m_geometry->backButtonStartRect(m_scrollbar);
@@ -148,7 +147,7 @@ public:
return make_scoped_ptr(new ScrollbarThumbPainter(scrollbar, painter, geometry));
}
- virtual void paint(SkCanvas* skCanvas, const IntRect& contentRect, FloatRect& opaque) OVERRIDE
+ virtual void paint(SkCanvas* skCanvas, const gfx::Rect& contentRect, gfx::RectF& opaque) OVERRIDE
{
WebKit::WebCanvas* canvas = skCanvas;
@@ -226,14 +225,14 @@ void ScrollbarLayer::updatePart(CachingBitmapContentLayerUpdater* painter, Layer
// Paint and upload the entire part.
float widthScale = static_cast<float>(contentBounds().width()) / bounds().width();
float heightScale = static_cast<float>(contentBounds().height()) / bounds().height();
- IntRect paintedOpaqueRect;
+ gfx::Rect paintedOpaqueRect;
painter->prepareToUpdate(rect, rect.size(), widthScale, heightScale, paintedOpaqueRect, stats);
if (!painter->pixelsDidChange() && texture->texture()->haveBackingTexture()) {
TRACE_EVENT_INSTANT0("cc","ScrollbarLayer::updatePart no texture upload needed");
return;
}
- IntSize destOffset(0, 0);
+ gfx::Vector2d destOffset(0, 0);
texture->update(queue, rect, destOffset, false, stats);
}
« no previous file with comments | « cc/resource_update_controller_unittest.cc ('k') | cc/skpicture_content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698