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

Unified Diff: ui/base/native_theme/native_theme_base.cc

Issue 10790128: Revert 147915 - 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
===================================================================
--- ui/base/native_theme/native_theme_base.cc (revision 147935)
+++ ui/base/native_theme/native_theme_base.cc (working copy)
@@ -8,7 +8,6 @@
#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"
@@ -1021,9 +1020,8 @@
SkMatrix m = sk_canvas->getTotalMatrix();
ui::ScaleFactor device_scale_factor = ui::GetScaleFactorFromScale(
SkScalarAbs(m.getScaleX()));
- scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling(
- sk_canvas, device_scale_factor));
- canvas->DrawImageInt(image, src_x, src_y, src_w, src_h,
+ gfx::Canvas canvas(sk_canvas, device_scale_factor, false);
+ canvas.DrawImageInt(image, src_x, src_y, src_w, src_h,
dest_x, dest_y, dest_w, dest_h, true);
}
@@ -1036,9 +1034,8 @@
SkMatrix m = sk_canvas->getTotalMatrix();
ui::ScaleFactor device_scale_factor = ui::GetScaleFactorFromScale(
SkScalarAbs(m.getScaleX()));
- scoped_ptr<gfx::Canvas> canvas(gfx::Canvas::CreateCanvasWithoutScaling(
- sk_canvas, device_scale_factor));
- canvas->TileImageInt(image, src_x, src_y, tile_scale_x,
+ gfx::Canvas canvas(sk_canvas, device_scale_factor, false);
+ 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