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

Unified Diff: cc/test/fake_picture_pile_impl.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/test/fake_picture_pile.cc ('k') | cc/test/fake_picture_pile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_pile_impl.h
diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h
index 3a437027aa0417e528a956eaf3c0f4fabeb0a008..a21509a0800857be14b46df6aad36e5ef6519d83 100644
--- a/cc/test/fake_picture_pile_impl.h
+++ b/cc/test/fake_picture_pile_impl.h
@@ -7,7 +7,7 @@
#include "base/memory/ref_counted.h"
#include "cc/resources/picture_pile_impl.h"
-#include "cc/test/fake_content_layer_client.h"
+#include "cc/test/fake_picture_pile.h"
namespace base {
class WaitableEvent;
@@ -17,6 +17,11 @@ namespace cc {
class FakePicturePileImpl : public PicturePileImpl {
public:
+ static scoped_refptr<FakePicturePileImpl> CreatePile(
+ const gfx::Size& tile_size,
+ const gfx::Size& layer_bounds,
+ bool is_filled);
+
static scoped_refptr<FakePicturePileImpl> CreateFilledPileWithDefaultTileSize(
const gfx::Size& layer_bounds) {
return CreateFilledPile(gfx::Size(512, 512), layer_bounds);
@@ -32,8 +37,9 @@ class FakePicturePileImpl : public PicturePileImpl {
const gfx::Size& tile_size,
const gfx::Size& layer_bounds);
static scoped_refptr<FakePicturePileImpl>
- CreateEmptyPileThatThinksItHasRecordings(const gfx::Size& tile_size,
- const gfx::Size& layer_bounds);
+ CreateEmptyPileThatThinksItHasRecordings(const gfx::Size& tile_size,
+ const gfx::Size& layer_bounds,
+ bool is_solid_color);
static scoped_refptr<FakePicturePileImpl> CreateInfiniteFilledPile();
static scoped_refptr<FakePicturePileImpl> CreateFromPile(
const PicturePile* other,
@@ -44,63 +50,18 @@ class FakePicturePileImpl : public PicturePileImpl {
const gfx::Rect& canvas_rect,
float contents_scale) const override;
- TilingData& tiling() { return tiling_; }
-
- void AddRecordingAt(int x, int y);
- void RemoveRecordingAt(int x, int y);
- void RerecordPile();
-
- void add_draw_rect(const gfx::RectF& rect) {
- client_.add_draw_rect(rect, default_paint_);
- }
-
- void add_draw_bitmap(const SkBitmap& bitmap, const gfx::Point& point) {
- client_.add_draw_bitmap(bitmap, point, default_paint_);
- }
-
- void add_draw_rect_with_paint(const gfx::RectF& rect, const SkPaint& paint) {
- client_.add_draw_rect(rect, paint);
- }
-
- void add_draw_bitmap_with_paint(const SkBitmap& bitmap,
- const gfx::Point& point,
- const SkPaint& paint) {
- client_.add_draw_bitmap(bitmap, point, paint);
- }
-
- void set_default_paint(const SkPaint& paint) {
- default_paint_ = paint;
- }
-
- void set_background_color(SkColor color) {
- background_color_ = color;
- }
-
- void set_clear_canvas_with_debug_color(bool clear) {
- clear_canvas_with_debug_color_ = clear;
- }
-
- void set_is_solid_color(bool is_solid_color) {
- is_solid_color_ = is_solid_color;
- }
+ const TilingData& tiling() { return tiling_; }
bool HasRecordingAt(int x, int y) const;
-
int num_tiles_x() const { return tiling_.num_tiles_x(); }
int num_tiles_y() const { return tiling_.num_tiles_y(); }
- void SetMinContentsScale(float scale);
- void SetBufferPixels(int new_buffer_pixels);
- void Clear();
-
protected:
FakePicturePileImpl();
FakePicturePileImpl(const PicturePile* other,
base::WaitableEvent* playback_allowed_event);
~FakePicturePileImpl() override;
- FakeContentLayerClient client_;
- SkPaint default_paint_;
base::WaitableEvent* playback_allowed_event_;
gfx::Size tile_grid_size_;
};
« no previous file with comments | « cc/test/fake_picture_pile.cc ('k') | cc/test/fake_picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698