| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/bubble/bubble_border.h" | 5 #include "ui/views/bubble/bubble_border.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 344 |
| 345 // Fill the contents with a round-rect region to match the border images. | 345 // Fill the contents with a round-rect region to match the border images. |
| 346 SkPaint paint; | 346 SkPaint paint; |
| 347 paint.setAntiAlias(true); | 347 paint.setAntiAlias(true); |
| 348 paint.setStyle(SkPaint::kFill_Style); | 348 paint.setStyle(SkPaint::kFill_Style); |
| 349 paint.setColor(border_->background_color()); | 349 paint.setColor(border_->background_color()); |
| 350 SkPath path; | 350 SkPath path; |
| 351 gfx::Rect bounds(view->GetLocalBounds()); | 351 gfx::Rect bounds(view->GetLocalBounds()); |
| 352 bounds.Inset(border_->GetInsets()); | 352 bounds.Inset(border_->GetInsets()); |
| 353 | 353 |
| 354 SkScalar radius = SkIntToScalar(border_->GetBorderCornerRadius()); | 354 canvas->DrawRoundRect(bounds, border_->GetBorderCornerRadius(), paint); |
| 355 path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius); | |
| 356 canvas->DrawPath(path, paint); | |
| 357 } | 355 } |
| 358 | 356 |
| 359 } // namespace views | 357 } // namespace views |
| OLD | NEW |