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

Unified Diff: ui/native_theme/common_theme.cc

Issue 1124223010: ui: Eliminate allocating gfx::Canvas on the heap for every view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/compositor/paint_recorder.cc ('K') | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/common_theme.cc
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index 2b7f84485d4ff886ee40551a399c8d02b6bbd0d5..80f3452d76d822e45f668cc4e78bb3297c71ad49 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -221,8 +221,7 @@ scoped_ptr<gfx::Canvas> CommonThemeCreateCanvas(SkCanvas* sk_canvas) {
// scale factor from canvas scale.
SkMatrix m = sk_canvas->getTotalMatrix();
float device_scale = static_cast<float>(SkScalarAbs(m.getScaleX()));
- return make_scoped_ptr(
- gfx::Canvas::CreateCanvasWithoutScaling(sk_canvas, device_scale));
+ return make_scoped_ptr(new gfx::Canvas(sk_canvas, device_scale));
}
} // namespace ui
« ui/compositor/paint_recorder.cc ('K') | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698