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

Unified Diff: ui/base/native_theme/native_theme_base.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/base/native_theme/native_theme_android.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/native_theme/native_theme_base.cc
diff --git a/ui/base/native_theme/native_theme_base.cc b/ui/base/native_theme/native_theme_base.cc
index eab57e0640c75b12b21057cfaba29566151380f9..57b0a4e5ca50fe3dbf5ef258937f75aa0688c230 100644
--- a/ui/base/native_theme/native_theme_base.cc
+++ b/ui/base/native_theme/native_theme_base.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
#include "grit/ui_resources.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/layout.h"
@@ -1020,8 +1021,9 @@ void NativeThemeBase::DrawImageInt(
SkMatrix m = sk_canvas->getTotalMatrix();
ui::ScaleFactor device_scale_factor = ui::GetScaleFactorFromScale(
SkScalarAbs(m.getScaleX()));
- gfx::Canvas canvas(sk_canvas, device_scale_factor, false);
- canvas.DrawImageInt(image, src_x, src_y, src_w, src_h,
+ scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling(
+ sk_canvas, device_scale_factor));
+ canvas->DrawImageInt(image, src_x, src_y, src_w, src_h,
dest_x, dest_y, dest_w, dest_h, true);
}
@@ -1034,8 +1036,9 @@ void NativeThemeBase::DrawTiledImage(SkCanvas* sk_canvas,
SkMatrix m = sk_canvas->getTotalMatrix();
ui::ScaleFactor device_scale_factor = ui::GetScaleFactorFromScale(
SkScalarAbs(m.getScaleX()));
- gfx::Canvas canvas(sk_canvas, device_scale_factor, false);
- canvas.TileImageInt(image, src_x, src_y, tile_scale_x,
+ scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling(
+ sk_canvas, device_scale_factor));
+ canvas->TileImageInt(image, src_x, src_y, tile_scale_x,
tile_scale_y, dest_x, dest_y, w, h);
}
« no previous file with comments | « ui/base/native_theme/native_theme_android.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698