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

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

Issue 1161933007: ui: Introduce CanvasPainter, remove PaintContext(gfx::Canvas*). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: canvaspainter: . Created 5 years, 6 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/controls/label_unittest.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 9e4111dd0fe1713489e27be3ca6d63faa8f20db2..347de70d3e91b4b092696d1f252635989ba21970 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -14,7 +14,7 @@
#include "ui/base/dragdrop/drag_utils.h"
#include "ui/base/touch/selection_bound.h"
#include "ui/base/ui_base_switches_util.h"
-#include "ui/compositor/paint_context.h"
+#include "ui/compositor/canvas_painter.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -1082,7 +1082,7 @@ void Textfield::WriteDragDataForView(View* sender,
// Desktop Linux Aura does not yet support transparency in drag images.
canvas->DrawColor(GetBackgroundColor());
#endif
- label.Paint(ui::PaintContext(canvas.get()));
+ label.Paint(ui::CanvasPainter(canvas.get(), 1.f).context());
const gfx::Vector2d kOffset(-15, 0);
drag_utils::SetDragImageOnDataObject(*canvas, kOffset, data);
if (controller_)
« no previous file with comments | « ui/views/controls/label_unittest.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698