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

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

Issue 2694023003: Make CanvasPainter raster directly to an SkBitmap (Closed)
Patch Set: tapted review 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
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5f370f8ee4d72b751cdf24d8fd34d2c4afd27a46 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 = SK_ColorTRANSPARENT;
+ Paint(ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color).context());
}
// View:
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698