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

Unified Diff: cc/test/fake_content_layer_client.cc

Issue 690493002: cc: Add an integration test for what scale we draw with after pinching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pinchblurmerge-test: compile Created 6 years, 2 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 | « no previous file | cc/test/layer_tree_test.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 d97869cc0ac876efbb340ed4671460698ecca755..5463aedf24dd2f8c6944f2efb7e69de34f9eadb2 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -40,17 +40,15 @@ void FakeContentLayerClient::PaintContents(
canvas->drawBitmap(it->bitmap, it->point.x(), it->point.y(), &it->paint);
}
- // Add a rectangle to the middle that doesn't fill |paint_rect| so that solid
- // color analysis will fail.
if (fill_with_nonsolid_color_) {
gfx::RectF draw_rect = paint_rect;
- draw_rect.Inset(draw_rect.width() / 4.0f, draw_rect.height() / 4.0f);
- SkPaint paint;
- canvas->drawRectCoords(draw_rect.x(),
- draw_rect.y(),
- draw_rect.right(),
- draw_rect.bottom(),
- paint);
+ bool red = true;
+ while (!draw_rect.IsEmpty()) {
+ SkPaint paint;
+ paint.setColor(red ? SK_ColorRED : SK_ColorBLUE);
+ canvas->drawRect(gfx::RectFToSkRect(draw_rect), paint);
+ draw_rect.Inset(1, 1);
+ }
}
}
« no previous file with comments | « no previous file | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698