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

Unified Diff: cc/playback/raster_source_unittest.cc

Issue 1854513002: cc: Add RasterSource::PlaybackSettings for finer control of raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/playback/raster_source.cc ('k') | cc/raster/bitmap_tile_task_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/raster_source_unittest.cc
diff --git a/cc/playback/raster_source_unittest.cc b/cc/playback/raster_source_unittest.cc
index d88d49d63e1ae6d2d3b3c1b237f1edae1bac11a1..7efbaf937a641d8e0c9360d2f4378e0822cd6f59 100644
--- a/cc/playback/raster_source_unittest.cc
+++ b/cc/playback/raster_source_unittest.cc
@@ -285,9 +285,9 @@ TEST(RasterSourceTest, RasterFullContents) {
SkCanvas canvas(bitmap);
canvas.clear(SK_ColorTRANSPARENT);
- const bool include_images = true;
raster->PlaybackToCanvas(&canvas, canvas_rect, canvas_rect,
- contents_scale, include_images);
+ contents_scale,
+ RasterSource::PlaybackSettings());
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
int num_pixels = bitmap.width() * bitmap.height();
@@ -337,9 +337,8 @@ TEST(RasterSourceTest, RasterPartialContents) {
// Playback the full rect which should make everything white.
gfx::Rect raster_full_rect(content_bounds);
gfx::Rect playback_rect(content_bounds);
- const bool include_images = true;
raster->PlaybackToCanvas(&canvas, raster_full_rect, playback_rect,
- contents_scale, include_images);
+ contents_scale, RasterSource::PlaybackSettings());
{
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
@@ -370,7 +369,7 @@ TEST(RasterSourceTest, RasterPartialContents) {
// that touches the edge pixels of the recording.
playback_rect.Inset(1, 2, 0, 1);
raster->PlaybackToCanvas(&canvas, raster_full_rect, playback_rect,
- contents_scale, include_images);
+ contents_scale, RasterSource::PlaybackSettings());
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
int num_black = 0;
@@ -433,9 +432,8 @@ TEST(RasterSourceTest, RasterPartialClear) {
// Playback the full rect which should make everything light gray (alpha=10).
gfx::Rect raster_full_rect(content_bounds);
gfx::Rect playback_rect(content_bounds);
- const bool include_images = true;
raster->PlaybackToCanvas(&canvas, raster_full_rect, playback_rect,
- contents_scale, include_images);
+ contents_scale, RasterSource::PlaybackSettings());
{
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
@@ -474,7 +472,7 @@ TEST(RasterSourceTest, RasterPartialClear) {
playback_rect =
gfx::Rect(gfx::ScaleToCeiledSize(partial_bounds, contents_scale));
raster->PlaybackToCanvas(&canvas, raster_full_rect, playback_rect,
- contents_scale, include_images);
+ contents_scale, RasterSource::PlaybackSettings());
// Test that the whole playback_rect was cleared and repainted with new alpha.
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
@@ -513,9 +511,8 @@ TEST(RasterSourceTest, RasterContentsTransparent) {
bitmap.allocN32Pixels(canvas_rect.width(), canvas_rect.height());
SkCanvas canvas(bitmap);
- const bool include_images = true;
raster->PlaybackToCanvas(&canvas, canvas_rect, canvas_rect, contents_scale,
- include_images);
+ RasterSource::PlaybackSettings());
SkColor* pixels = reinterpret_cast<SkColor*>(bitmap.getPixels());
int num_pixels = bitmap.width() * bitmap.height();
« no previous file with comments | « cc/playback/raster_source.cc ('k') | cc/raster/bitmap_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698