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

Unified Diff: cc/test/fake_picture_layer_impl.h

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_layer_tree_host_client.cc ('k') | cc/test/fake_picture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_layer_impl.h
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index b10b357c7debacb6d23e01f761176d53cd629b18..d633051a93b25fcfd4b7f7b7deb508b235d4eed2 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -14,7 +14,8 @@ class FakePictureLayerImpl : public PictureLayerImpl {
public:
static scoped_ptr<FakePictureLayerImpl> Create(
LayerTreeImpl* tree_impl, int id) {
- return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id));
+ bool is_mask = false;
+ return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, is_mask));
}
// Create layer from a raster source that covers the entire layer.
@@ -22,8 +23,9 @@ class FakePictureLayerImpl : public PictureLayerImpl {
LayerTreeImpl* tree_impl,
int id,
scoped_refptr<RasterSource> raster_source) {
+ bool is_mask = false;
return make_scoped_ptr(
- new FakePictureLayerImpl(tree_impl, id, raster_source));
+ new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask));
}
// Create layer from a raster source that only covers part of the layer.
@@ -32,11 +34,24 @@ class FakePictureLayerImpl : public PictureLayerImpl {
int id,
scoped_refptr<RasterSource> raster_source,
const gfx::Size& layer_bounds) {
+ bool is_mask = false;
+ return make_scoped_ptr(new FakePictureLayerImpl(
+ tree_impl, id, raster_source, is_mask, layer_bounds));
+ }
+
+ // Create layer from a raster source that covers the entire layer and is a
+ // mask.
+ static scoped_ptr<FakePictureLayerImpl> CreateMaskWithRasterSource(
+ LayerTreeImpl* tree_impl,
+ int id,
+ scoped_refptr<RasterSource> raster_source) {
+ bool is_mask = true;
return make_scoped_ptr(
- new FakePictureLayerImpl(tree_impl, id, raster_source, layer_bounds));
+ new FakePictureLayerImpl(tree_impl, id, raster_source, is_mask));
}
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
+ void PushPropertiesTo(LayerImpl* layer_impl) override;
void AppendQuads(RenderPass* render_pass,
const Occlusion& occlusion_in_content_space,
AppendQuadsData* append_quads_data) override;
@@ -91,7 +106,8 @@ class FakePictureLayerImpl : public PictureLayerImpl {
PictureLayerTilingSet* tilings() { return tilings_.get(); }
RasterSource* raster_source() { return raster_source_.get(); }
- void SetRasterSource(scoped_refptr<RasterSource> raster_source);
+ void SetRasterSourceOnPending(scoped_refptr<RasterSource> raster_source,
+ const Region& invalidation);
size_t append_quads_count() { return append_quads_count_; }
const Region& invalidation() const { return invalidation_; }
@@ -103,7 +119,9 @@ class FakePictureLayerImpl : public PictureLayerImpl {
void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; }
+ // TODO(danakj): Remove this darn thing.
void CreateDefaultTilingsAndTiles();
+
void SetAllTilesVisible();
void SetAllTilesReady();
void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
@@ -123,12 +141,14 @@ class FakePictureLayerImpl : public PictureLayerImpl {
protected:
FakePictureLayerImpl(LayerTreeImpl* tree_impl,
int id,
- scoped_refptr<RasterSource> raster_source);
+ scoped_refptr<RasterSource> raster_source,
+ bool is_mask);
FakePictureLayerImpl(LayerTreeImpl* tree_impl,
int id,
scoped_refptr<RasterSource> raster_source,
+ bool is_mask,
const gfx::Size& layer_bounds);
- FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
+ FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask);
private:
gfx::Size fixed_tile_size_;
« no previous file with comments | « cc/test/fake_layer_tree_host_client.cc ('k') | cc/test/fake_picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698