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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 9544001: ui: Let skia do the conversion work for us by using the integer version of set() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify FocusableBorder::Paint Created 8 years, 10 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 | « no previous file | ui/gfx/native_theme_android.cc » ('j') | ui/gfx/native_theme_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_skia.cc
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 6e44931f5b92953d388b135cd13c38b259c77702..5ae821c1c9b9dd662fa71be2a86f232f141cc89a 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);
}
« no previous file with comments | « no previous file | ui/gfx/native_theme_android.cc » ('j') | ui/gfx/native_theme_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698