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

Unified Diff: ui/gfx/image/image.cc

Issue 10701063: Cleanup gfx::Canvas now that 10562027 has landed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « ui/gfx/image/canvas_image_source.cc ('k') | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index c5d30a29210fbf4db294a8f4df3189e27a2c739d..ea302ab58a6297a3a9a9861d93be30ab5c29698a 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -32,12 +32,14 @@ namespace internal {
const ImageSkia ImageSkiaFromGdkPixbuf(GdkPixbuf* pixbuf) {
CHECK(pixbuf);
gfx::Canvas canvas(gfx::Size(gdk_pixbuf_get_width(pixbuf),
- gdk_pixbuf_get_height(pixbuf)), false);
+ gdk_pixbuf_get_height(pixbuf)),
+ ui::SCALE_FACTOR_100P,
+ false);
skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas());
cairo_t* cr = scoped_platform_paint.GetPlatformSurface();
gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
cairo_paint(cr);
- return ImageSkia(SkBitmap(canvas.ExtractBitmap()));
+ return ImageSkia(canvas.ExtractImageRep());
}
#endif
« no previous file with comments | « ui/gfx/image/canvas_image_source.cc ('k') | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698