Index: cc/raster/raster_source_unittest.cc |
diff --git a/cc/raster/raster_source_unittest.cc b/cc/raster/raster_source_unittest.cc |
index 743f84ebb5888045bbf2d8bfbf4695e8af4f0ce9..b355b55cef59e2131bdf25d07419cf68db967e07 100644 |
--- a/cc/raster/raster_source_unittest.cc |
+++ b/cc/raster/raster_source_unittest.cc |
@@ -8,6 +8,7 @@ |
#include <memory> |
+#include "cc/base/scale_translate2d.h" |
#include "cc/test/fake_recording_source.h" |
#include "cc/test/skia_common.h" |
#include "cc/tiles/software_image_decode_cache.h" |
@@ -290,9 +291,10 @@ TEST(RasterSourceTest, RasterFullContents) { |
SkCanvas canvas(bitmap); |
canvas.clear(SK_ColorTRANSPARENT); |
- raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), canvas_rect, |
- canvas_rect, contents_scale, |
- RasterSource::PlaybackSettings()); |
+ raster->PlaybackToCanvas( |
+ &canvas, ColorSpaceForTesting(), canvas_rect, canvas_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
+ RasterSource::PlaybackSettings()); |
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels()); |
int num_pixels = bitmap.width() * bitmap.height(); |
@@ -343,7 +345,8 @@ TEST(RasterSourceTest, RasterPartialContents) { |
gfx::Rect raster_full_rect(content_bounds); |
gfx::Rect playback_rect(content_bounds); |
raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), raster_full_rect, |
- playback_rect, contents_scale, |
+ playback_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
{ |
@@ -375,7 +378,8 @@ TEST(RasterSourceTest, RasterPartialContents) { |
// that touches the edge pixels of the recording. |
playback_rect.Inset(1, 2, 0, 1); |
raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), raster_full_rect, |
- playback_rect, contents_scale, |
+ playback_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels()); |
@@ -440,7 +444,8 @@ TEST(RasterSourceTest, RasterPartialClear) { |
gfx::Rect raster_full_rect(content_bounds); |
gfx::Rect playback_rect(content_bounds); |
raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), raster_full_rect, |
- playback_rect, contents_scale, |
+ playback_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
{ |
@@ -480,7 +485,8 @@ TEST(RasterSourceTest, RasterPartialClear) { |
playback_rect = |
gfx::Rect(gfx::ScaleToCeiledSize(partial_bounds, contents_scale)); |
raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), raster_full_rect, |
- playback_rect, contents_scale, |
+ playback_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
// Test that the whole playback_rect was cleared and repainted with new alpha. |
@@ -521,7 +527,8 @@ TEST(RasterSourceTest, RasterContentsTransparent) { |
SkCanvas canvas(bitmap); |
raster->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), canvas_rect, |
- canvas_rect, contents_scale, |
+ canvas_rect, |
+ ScaleTranslate2d(contents_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels()); |
@@ -595,8 +602,8 @@ TEST(RasterSourceTest, ImageHijackCanvasRespectsSharedCanvasTransform) { |
settings.playback_to_shared_canvas = true; |
settings.use_image_hijack_canvas = true; |
raster_source->PlaybackToCanvas(&canvas, ColorSpaceForTesting(), |
- gfx::Rect(size), gfx::Rect(size), 1.f, |
- settings); |
+ gfx::Rect(size), gfx::Rect(size), |
+ ScaleTranslate2d(), settings); |
EXPECT_EQ(SK_ColorGREEN, bitmap.getColor(0, 0)); |
EXPECT_EQ(SK_ColorGREEN, bitmap.getColor(49, 0)); |