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

Unified Diff: cc/tiles/tile_manager_unittest.cc

Issue 2678903003: cc: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 years, 10 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
Index: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index d1346be3ab0957b1cd397597ac50f098e689bb93..8e4d4aecd3ad90219adc2356db19185be6486119 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -1423,19 +1423,19 @@ TEST_F(TileManagerTilePriorityQueueTest, NoRasterTasksforSolidColorTiles) {
std::unique_ptr<FakeRecordingSource> recording_source =
FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
- PaintFlags solid_paint;
+ PaintFlags solid_flags;
SkColor solid_color = SkColorSetARGB(255, 12, 23, 34);
- solid_paint.setColor(solid_color);
- recording_source->add_draw_rect_with_paint(gfx::Rect(layer_bounds),
- solid_paint);
+ solid_flags.setColor(solid_color);
+ recording_source->add_draw_rect_with_flags(gfx::Rect(layer_bounds),
+ solid_flags);
// Create non solid tile as well, otherwise tilings wouldnt be created.
SkColor non_solid_color = SkColorSetARGB(128, 45, 56, 67);
- PaintFlags non_solid_paint;
- non_solid_paint.setColor(non_solid_color);
+ PaintFlags non_solid_flags;
+ non_solid_flags.setColor(non_solid_color);
- recording_source->add_draw_rect_with_paint(gfx::Rect(0, 0, 10, 10),
- non_solid_paint);
+ recording_source->add_draw_rect_with_flags(gfx::Rect(0, 0, 10, 10),
+ non_solid_flags);
recording_source->Rerecord();
scoped_refptr<RasterSource> raster_source =
@@ -1636,9 +1636,9 @@ TEST_F(TileManagerTest, LowResHasNoImage) {
recording_source->SetBackgroundColor(SK_ColorTRANSPARENT);
recording_source->SetRequiresClear(true);
recording_source->SetClearCanvasWithDebugColor(false);
- PaintFlags paint;
- paint.setColor(SK_ColorGREEN);
- recording_source->add_draw_rect_with_paint(gfx::Rect(size), paint);
+ PaintFlags flags;
+ flags.setColor(SK_ColorGREEN);
+ recording_source->add_draw_rect_with_flags(gfx::Rect(size), flags);
recording_source->add_draw_image(std::move(blue_image), gfx::Point());
recording_source->Rerecord();
scoped_refptr<RasterSource> raster =
@@ -1728,11 +1728,11 @@ TEST_F(ActivationTasksDoNotBlockReadyToDrawTest,
std::unique_ptr<FakeRecordingSource> active_tree_recording_source =
FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
- PaintFlags solid_paint;
+ PaintFlags solid_flags;
SkColor solid_color = SkColorSetARGB(255, 12, 23, 34);
- solid_paint.setColor(solid_color);
- active_tree_recording_source->add_draw_rect_with_paint(
- gfx::Rect(layer_bounds), solid_paint);
+ solid_flags.setColor(solid_color);
+ active_tree_recording_source->add_draw_rect_with_flags(
+ gfx::Rect(layer_bounds), solid_flags);
active_tree_recording_source->Rerecord();
@@ -1740,11 +1740,11 @@ TEST_F(ActivationTasksDoNotBlockReadyToDrawTest,
std::unique_ptr<FakeRecordingSource> pending_tree_recording_source =
FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
SkColor non_solid_color = SkColorSetARGB(128, 45, 56, 67);
- PaintFlags non_solid_paint;
- non_solid_paint.setColor(non_solid_color);
+ PaintFlags non_solid_flags;
+ non_solid_flags.setColor(non_solid_color);
- pending_tree_recording_source->add_draw_rect_with_paint(
- gfx::Rect(5, 5, 10, 10), non_solid_paint);
+ pending_tree_recording_source->add_draw_rect_with_flags(
+ gfx::Rect(5, 5, 10, 10), non_solid_flags);
pending_tree_recording_source->Rerecord();
scoped_refptr<RasterSource> active_tree_raster_source =
@@ -1981,24 +1981,24 @@ class TileManagerReadyToDrawTest : public TileManagerTest {
solid_color_recording_source_ =
FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
- SkPaint solid_paint;
+ PaintFlags solid_flags;
SkColor solid_color = SkColorSetARGB(255, 12, 23, 34);
- solid_paint.setColor(solid_color);
- solid_color_recording_source_->add_draw_rect_with_paint(
- gfx::Rect(layer_bounds), solid_paint);
+ solid_flags.setColor(solid_color);
+ solid_color_recording_source_->add_draw_rect_with_flags(
+ gfx::Rect(layer_bounds), solid_flags);
solid_color_recording_source_->Rerecord();
recording_source_ =
FakeRecordingSource::CreateFilledRecordingSource(layer_bounds);
SkColor non_solid_color = SkColorSetARGB(128, 45, 56, 67);
- SkPaint non_solid_paint;
- non_solid_paint.setColor(non_solid_color);
+ PaintFlags non_solid_flags;
+ non_solid_flags.setColor(non_solid_color);
for (int i = 0; i < 100; ++i) {
for (int j = 0; j < 100; ++j) {
- recording_source_->add_draw_rect_with_paint(
- gfx::Rect(10 * i, 10 * j, 5, 5), non_solid_paint);
+ recording_source_->add_draw_rect_with_flags(
+ gfx::Rect(10 * i, 10 * j, 5, 5), non_solid_flags);
}
}
recording_source_->Rerecord();

Powered by Google App Engine
This is Rietveld 408576698