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

Unified Diff: ui/views/controls/tree/tree_view_win.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
Index: ui/views/controls/tree/tree_view_win.cc
diff --git a/ui/views/controls/tree/tree_view_win.cc b/ui/views/controls/tree/tree_view_win.cc
index 5a81519aeb7072cc37b37080b42117d35a5683ac..8fa702a9ce2cfd3b76aa2d968eb86d10aaee9779 100644
--- a/ui/views/controls/tree/tree_view_win.cc
+++ b/ui/views/controls/tree/tree_view_win.cc
@@ -691,13 +691,15 @@ HIMAGELIST TreeView::CreateImageList() {
// IDR_FOLDER_CLOSED if they aren't already.
if (model_images[i].width() != width ||
model_images[i].height() != height) {
- gfx::Canvas canvas(gfx::Size(width, height), false);
+ gfx::Canvas canvas(gfx::Size(width, height), ui::SCALE_FACTOR_100P,
+ false);
// Draw our icons into this canvas.
int height_offset = (height - model_images[i].height()) / 2;
int width_offset = (width - model_images[i].width()) / 2;
canvas.DrawImageInt(model_images[i], width_offset, height_offset);
- model_icon = IconUtil::CreateHICONFromSkBitmap(canvas.ExtractBitmap());
+ model_icon = IconUtil::CreateHICONFromSkBitmap(
+ canvas.ExtractImageRep().sk_bitmap());
} else {
model_icon = IconUtil::CreateHICONFromSkBitmap(model_images[i]);
}

Powered by Google App Engine
This is Rietveld 408576698