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

Unified Diff: ui/views/controls/button/label_button_border.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 11 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/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button_border.cc
diff --git a/ui/views/controls/button/label_button_border.cc b/ui/views/controls/button/label_button_border.cc
index b1ff3a56206352f4f20119941312ef841c2ffc04..a5116d0edc2c822f67a1854fe87ca4c36314f143 100644
--- a/ui/views/controls/button/label_button_border.cc
+++ b/ui/views/controls/button/label_button_border.cc
@@ -5,7 +5,7 @@
#include "ui/views/controls/button/label_button_border.h"
#include "base/logging.h"
-#include "third_party/skia/include/core/SkPaint.h"
+#include "cc/paint/paint_flags.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/animation/animation.h"
#include "ui/gfx/canvas.h"
@@ -142,19 +142,19 @@ void LabelButtonAssetBorder::Paint(const View& view, gfx::Canvas* canvas) {
static_cast<uint8_t>(animation->CurrentValueBetween(0, 255));
const SkRect sk_rect = gfx::RectToSkRect(rect);
- SkAutoCanvasRestore auto_restore(canvas->sk_canvas(), false);
+ cc::PaintCanvasAutoRestore auto_restore(canvas->sk_canvas(), false);
canvas->sk_canvas()->saveLayer(&sk_rect, nullptr);
{
// First, modulate the background by 1 - alpha.
- SkAutoCanvasRestore auto_restore(canvas->sk_canvas(), false);
+ cc::PaintCanvasAutoRestore auto_restore(canvas->sk_canvas(), false);
canvas->sk_canvas()->saveLayerAlpha(&sk_rect, 255 - fg_alpha);
state = native_theme_delegate->GetBackgroundThemeState(&extra);
PaintHelper(this, canvas, state, rect, extra);
}
// Then modulate the foreground by alpha, and blend using kPlus_Mode.
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setAlpha(fg_alpha);
paint.setBlendMode(SkBlendMode::kPlus);
canvas->sk_canvas()->saveLayer(&sk_rect, &paint);
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/radio_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698