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

Unified Diff: ui/views/controls/label_unittest.cc

Issue 2694023003: Make CanvasPainter raster directly to an SkBitmap (Closed)
Patch Set: Replace CanvasPainter rect with size 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: ui/views/controls/label_unittest.cc
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index 094c3365a739fed6ea7abdc1901c3b6e081450ff..2bb03b732cbbe651b1fc59869abef3c08f330497 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -52,8 +52,9 @@ class TestLabel : public Label {
int schedule_paint_count() const { return schedule_paint_count_; }
void SimulatePaint() {
- gfx::Canvas canvas(bounds().size(), 1.0, false /* is_opaque */);
- Paint(ui::CanvasPainter(&canvas, 1.f).context());
+ SkBitmap bitmap;
+ SkColor color(SkColorSetARGB(0, 0, 0, 0));
danakj 2017/02/14 21:37:26 TRANSPARENT
+ Paint(ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color).context());
}
// View:

Powered by Google App Engine
This is Rietveld 408576698