diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 02:31:59 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 02:31:59 +0000 |
commit | 61332ec78fa4a33f5af66c6baac63db0e3f27708 (patch) | |
tree | afcf66c8472c1c13429624abe7d4f9f2ec7f9de8 /cc/test/fake_content_layer_client.cc | |
parent | c97ac4f2fd093c1491d0295de2a0c614ae388000 (diff) | |
download | chromium_src-61332ec78fa4a33f5af66c6baac63db0e3f27708.zip chromium_src-61332ec78fa4a33f5af66c6baac63db0e3f27708.tar.gz chromium_src-61332ec78fa4a33f5af66c6baac63db0e3f27708.tar.bz2 |
cc: Add pixel tests for PictureDrawQuad
Add tests for simple pictures, clipped pictures, transformed pictures,
scaled content rects, content subrects, and content scales.
As the software renderer doesn't support picture draw quad yet, this is
only turned on for the gl renderer.
R=danakj@chromium.org
BUG=none
Review URL: https://chromiumcodereview.appspot.com/14001009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_content_layer_client.cc')
-rw-r--r-- | cc/test/fake_content_layer_client.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc index 280459b..16033b7 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(); |