diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 16:29:21 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 16:29:21 +0000 |
commit | b9857bdd37282ba346cbb2ccb52b67175ef490c0 (patch) | |
tree | 373a6f5904ab4e71c7b407a26512267f0c7b109c /ui/gfx/canvas_skia.cc | |
parent | 414d57a780c0f774a9e5c2a893f5189b88b43b6e (diff) | |
download | chromium_src-b9857bdd37282ba346cbb2ccb52b67175ef490c0.zip chromium_src-b9857bdd37282ba346cbb2ccb52b67175ef490c0.tar.gz chromium_src-b9857bdd37282ba346cbb2ccb52b67175ef490c0.tar.bz2 |
ui: Let skia do the conversion work for us by using the integer version of set() function.
R=pkasting@chromium.org
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9544001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/canvas_skia.cc')
-rw-r--r-- | ui/gfx/canvas_skia.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc index 6e44931..5ae821c 100644 --- a/ui/gfx/canvas_skia.cc +++ b/ui/gfx/canvas_skia.cc @@ -114,11 +114,7 @@ void CanvasSkia::SaveLayerAlpha(uint8 alpha) { void CanvasSkia::SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds) { - SkRect bounds; - bounds.set(SkIntToScalar(layer_bounds.x()), - SkIntToScalar(layer_bounds.y()), - SkIntToScalar(layer_bounds.right()), - SkIntToScalar(layer_bounds.bottom())); + SkRect bounds(gfx::RectToSkRect(layer_bounds)); canvas_->saveLayerAlpha(&bounds, alpha); } |