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

Unified Diff: cc/test/fake_content_layer_client.h

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 | « cc/playback/drawing_display_item.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5753e1cafcb55212e55d30969be9cbcf303e7eaa..8087d76e7e96959aed95891593a44946423d531a 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();
@@ -51,24 +51,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);
}
@@ -89,8 +89,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 fill_with_nonsolid_color_;
RectPaintVector draw_rects_;
« no previous file with comments | « cc/playback/drawing_display_item.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698