| Index: ui/gfx/native_theme_base.cc
|
| diff --git a/ui/gfx/native_theme_base.cc b/ui/gfx/native_theme_base.cc
|
| index 2448d1826704853351c79bade2f1a3969b4f4538..035563153874672fd98476d8ea6521af5c12a299 100644
|
| --- a/ui/gfx/native_theme_base.cc
|
| +++ b/ui/gfx/native_theme_base.cc
|
| @@ -520,10 +520,8 @@ void NativeThemeBase::PaintButton(SkCanvas* canvas,
|
| const int kLightEnd = state == kPressed ? 1 : 0;
|
| const int kDarkEnd = !kLightEnd;
|
| SkPoint gradient_bounds[2];
|
| - gradient_bounds[kLightEnd].set(SkIntToScalar(rect.x()),
|
| - SkIntToScalar(rect.y()));
|
| - gradient_bounds[kDarkEnd].set(SkIntToScalar(rect.x()),
|
| - SkIntToScalar(kBottom - 1));
|
| + gradient_bounds[kLightEnd].iset(rect.x(), rect.y());
|
| + gradient_bounds[kDarkEnd].iset(rect.x(), kBottom - 1);
|
| SkColor colors[2];
|
| colors[0] = light_color;
|
| colors[1] = base_color;
|
| @@ -804,25 +802,20 @@ void NativeThemeBase::PaintProgressBar(SkCanvas* canvas,
|
|
|
| int dest_left_border_width = static_cast<int>(left_border_image->width() *
|
| tile_scale);
|
| - SkRect dest_rect = {
|
| - SkIntToScalar(rect.x()),
|
| - SkIntToScalar(rect.y()),
|
| - SkIntToScalar(rect.x() + dest_left_border_width),
|
| - SkIntToScalar(rect.bottom())
|
| - };
|
| + SkRect dest_rect;
|
| + dest_rect.iset(rect.x(), rect.y(), rect.x() + dest_left_border_width,
|
| + rect.bottom());
|
| canvas->drawBitmapRect(*left_border_image, NULL, dest_rect);
|
|
|
| int dest_right_border_width = static_cast<int>(right_border_image->width() *
|
| tile_scale);
|
| - dest_rect.set(SkIntToScalar(rect.right() - dest_right_border_width),
|
| - SkIntToScalar(rect.y()),
|
| - SkIntToScalar(rect.right()),
|
| - SkIntToScalar(rect.bottom()));
|
| + dest_rect.iset(rect.right() - dest_right_border_width, rect.y(), rect.right(),
|
| + rect.bottom());
|
| canvas->drawBitmapRect(*right_border_image, NULL, dest_rect);
|
| }
|
|
|
| -bool NativeThemeBase::IntersectsClipRectInt(
|
| - SkCanvas* canvas, int x, int y, int w, int h) const {
|
| +bool NativeThemeBase::IntersectsClipRectInt(SkCanvas* canvas,
|
| + int x, int y, int w, int h) const {
|
| SkRect clip;
|
| return canvas->getClipBounds(&clip) &&
|
| clip.intersect(SkIntToScalar(x), SkIntToScalar(y), SkIntToScalar(x + w),
|
|
|