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

Unified Diff: ui/message_center/views/notification_view_unittest.cc

Issue 2792133002: Paint: remove readPixels. (Closed)
Patch Set: Created 3 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
« ui/gfx/canvas.cc ('K') | « ui/gfx/canvas.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_view_unittest.cc
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index 6f1211b9969607d6ddcc8bf22e60536b3942e03c..4f9413daeabfbf1d7b9d84df08ea67d5c448f8ab 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -132,10 +132,7 @@ class NotificationViewTest : public views::ViewsTestBase,
canvas.DrawColor(SK_ColorBLACK);
view->OnPaint(&canvas);
- SkBitmap bitmap;
- bitmap.allocN32Pixels(canvas_size.width(), canvas_size.height());
- canvas.sk_canvas()->readPixels(&bitmap, 0, 0);
-
+ SkBitmap bitmap = canvas.GetBitmap();
// Incrementally inset each edge at its midpoint to find the bounds of the
// rect containing the image's color. This assumes that the image is
// centered in the canvas.
« ui/gfx/canvas.cc ('K') | « ui/gfx/canvas.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698