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

Unified Diff: ui/views/animation/ink_drop_painted_layer_delegates.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Rebase 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
Index: ui/views/animation/ink_drop_painted_layer_delegates.cc
diff --git a/ui/views/animation/ink_drop_painted_layer_delegates.cc b/ui/views/animation/ink_drop_painted_layer_delegates.cc
index c098c83cd858f38a29d79e8bfc158044a71e5521..add54ab802826e1fcd01230c90110d2c8856a7e6 100644
--- a/ui/views/animation/ink_drop_painted_layer_delegates.cc
+++ b/ui/views/animation/ink_drop_painted_layer_delegates.cc
@@ -4,8 +4,9 @@
#include "ui/views/animation/ink_drop_painted_layer_delegates.h"
+#include "cc/paint/paint_canvas.h"
+#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkDrawLooper.h"
-#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/canvas.h"
@@ -56,10 +57,10 @@ gfx::Rect CircleLayerDelegate::GetPaintedBounds() const {
}
void CircleLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setColor(color());
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStyle(SkPaint::kFill_Style);
+ paint.setAntiAlias(true);
+ paint.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, GetPaintedBounds().size());
gfx::Canvas* canvas = recorder.canvas();
@@ -82,10 +83,10 @@ gfx::Rect RectangleLayerDelegate::GetPaintedBounds() const {
}
void RectangleLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setColor(color());
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStyle(SkPaint::kFill_Style);
+ paint.setAntiAlias(true);
+ paint.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, size_);
gfx::Canvas* canvas = recorder.canvas();
@@ -113,10 +114,10 @@ gfx::Rect RoundedRectangleLayerDelegate::GetPaintedBounds() const {
void RoundedRectangleLayerDelegate::OnPaintLayer(
const ui::PaintContext& context) {
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setColor(color());
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStyle(SkPaint::kFill_Style);
+ paint.setAntiAlias(true);
+ paint.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, size_);
recorder.canvas()->DrawRoundRect(GetPaintedBounds(), corner_radius_, paint);
@@ -151,8 +152,8 @@ gfx::Vector2dF BorderShadowLayerDelegate::GetCenteringOffset() const {
}
void BorderShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- SkPaint paint;
- paint.setStyle(SkPaint::kFill_Style);
+ cc::PaintFlags paint;
+ paint.setStyle(cc::PaintFlags::kFill_Style);
paint.setAntiAlias(true);
paint.setColor(fill_color_);

Powered by Google App Engine
This is Rietveld 408576698