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

Unified Diff: cc/test/fake_content_layer_client.h

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Re-add ios changes 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: cc/test/fake_content_layer_client.h
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index 8f43bfb3f454d8deaa7c721b3580d4f8eb981dc8..b104589c3683116c2cc6960e7940af61fb550942 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "cc/layers/content_layer_client.h"
+#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkImage.h"
-#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -26,16 +26,16 @@ class FakeContentLayerClient : public ContentLayerClient {
struct ImageData {
ImageData(sk_sp<const SkImage> image,
const gfx::Point& point,
- const SkPaint& paint);
+ const PaintFlags& paint);
ImageData(sk_sp<const SkImage> image,
const gfx::Transform& transform,
- const SkPaint& paint);
+ const PaintFlags& paint);
ImageData(const ImageData& other);
~ImageData();
sk_sp<const SkImage> image;
gfx::Point point;
gfx::Transform transform;
- SkPaint paint;
+ PaintFlags paint;
};
FakeContentLayerClient();
@@ -55,24 +55,24 @@ class FakeContentLayerClient : public ContentLayerClient {
fill_with_nonsolid_color_ = nonsolid;
}
- void add_draw_rect(const gfx::Rect& rect, const SkPaint& paint) {
+ void add_draw_rect(const gfx::Rect& rect, const PaintFlags& paint) {
draw_rects_.push_back(std::make_pair(gfx::RectF(rect), paint));
}
- void add_draw_rectf(const gfx::RectF& rect, const SkPaint& paint) {
+ void add_draw_rectf(const gfx::RectF& rect, const PaintFlags& paint) {
draw_rects_.push_back(std::make_pair(rect, paint));
}
void add_draw_image(sk_sp<const SkImage> image,
const gfx::Point& point,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
ImageData data(std::move(image), point, paint);
draw_images_.push_back(data);
}
void add_draw_image_with_transform(sk_sp<const SkImage> image,
const gfx::Transform& transform,
- const SkPaint& paint) {
+ const PaintFlags& paint) {
ImageData data(std::move(image), transform, paint);
draw_images_.push_back(data);
}
@@ -93,8 +93,8 @@ class FakeContentLayerClient : public ContentLayerClient {
}
private:
- typedef std::vector<std::pair<gfx::RectF, SkPaint>> RectPaintVector;
- typedef std::vector<ImageData> ImageVector;
+ using RectPaintVector = std::vector<std::pair<gfx::RectF, PaintFlags>>;
+ using ImageVector = std::vector<ImageData>;
bool display_list_use_cached_picture_;
bool fill_with_nonsolid_color_;

Powered by Google App Engine
This is Rietveld 408576698