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

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

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Resolving comments Created 3 years, 5 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/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 5c562f17a3797ab1b5f05efff1aa9ae10b34bd8f..010cb75f129c718e26e92180bf5c837d7305df17 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1115,8 +1115,11 @@ void Textfield::WriteDragDataForView(View* sender,
if (!ui::XVisualManager::GetInstance()->ArgbVisualAvailable())
color = GetBackgroundColor();
#endif
- label.Paint(
- ui::CanvasPainter(&bitmap, label.size(), raster_scale, color).context());
+ label.Paint(PaintInfo(
+ ui::CanvasPainter(&bitmap, label.size(), raster_scale, color,
+ GetWidget()->GetCompositor()->is_pixel_canvas())
+ .context(),
+ label.size()));
const gfx::Vector2d kOffset(-15, 0);
gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, raster_scale));
data->provider().SetDragImage(image, kOffset);

Powered by Google App Engine
This is Rietveld 408576698