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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 14001009: cc: Add pixel tests for PictureDrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup comment Created 7 years, 8 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/test/fake_content_layer_client.h ('k') | cc/test/fake_picture_pile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_content_layer_client.cc
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 280459b3cd0441f71970073a5e8b2ed1b36dce0a..16033b764614249da74a6678d697892c732c194d 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -17,21 +17,20 @@ FakeContentLayerClient::~FakeContentLayerClient() {
}
void FakeContentLayerClient::PaintContents(SkCanvas* canvas,
- gfx::Rect rect, gfx::RectF* opaque_rect) {
+ gfx::Rect paint_rect, gfx::RectF* opaque_rect) {
if (paint_all_opaque_)
- *opaque_rect = rect;
+ *opaque_rect = paint_rect;
- canvas->clipRect(gfx::RectToSkRect(rect));
+ canvas->clipRect(gfx::RectToSkRect(paint_rect));
for (RectPaintVector::const_iterator it = draw_rects_.begin();
it != draw_rects_.end(); ++it) {
- gfx::Rect rect = it->first;
+ const gfx::RectF& draw_rect = it->first;
const SkPaint& paint = it->second;
- SkRect draw_rect = SkRect::MakeXYWH(
- rect.x(),
- rect.y(),
- rect.width(),
- rect.height());
- canvas->drawRect(draw_rect, paint);
+ canvas->drawRectCoords(draw_rect.x(),
+ draw_rect.y(),
+ draw_rect.right(),
+ draw_rect.bottom(),
+ paint);
}
for (BitmapVector::const_iterator it = draw_bitmaps_.begin();
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698