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

Unified Diff: cc/test/fake_content_layer_client.h

Issue 1050103003: Revert of Revert of Implement DisplayList GatherPixelRefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/resources/recording_source_unittest.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 d53d34e2ea3d95ef6e716339de53df332396aa92..a4ecc590ea380b81600df28abdb8bbe2c8119b43 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -13,14 +13,24 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/transform.h"
namespace cc {
class FakeContentLayerClient : public ContentLayerClient {
public:
struct BitmapData {
+ BitmapData(const SkBitmap& bitmap,
+ const gfx::Point& point,
+ const SkPaint& paint);
+ BitmapData(const SkBitmap& bitmap,
+ const gfx::Transform& transform,
+ const SkPaint& paint);
+ ~BitmapData();
+
SkBitmap bitmap;
gfx::Point point;
+ gfx::Transform transform;
SkPaint paint;
};
@@ -46,10 +56,14 @@
void add_draw_bitmap(const SkBitmap& bitmap,
const gfx::Point& point,
const SkPaint& paint) {
- BitmapData data;
- data.bitmap = bitmap;
- data.point = point;
- data.paint = paint;
+ BitmapData data(bitmap, point, paint);
+ draw_bitmaps_.push_back(data);
+ }
+
+ void add_draw_bitmap_with_transform(const SkBitmap& bitmap,
+ const gfx::Transform& transform,
+ const SkPaint& paint) {
+ BitmapData data(bitmap, transform, paint);
draw_bitmaps_.push_back(data);
}
« no previous file with comments | « cc/resources/recording_source_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698