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

Unified Diff: cc/test/fake_picture_layer_impl.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_output_surface_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 4223811bd73e929e252a80ed99355c47e059887a..b10b357c7debacb6d23e01f761176d53cd629b18 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -17,20 +17,23 @@ class FakePictureLayerImpl : public PictureLayerImpl {
return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id));
}
- // Create layer from a pile that covers the entire layer.
- static scoped_ptr<FakePictureLayerImpl> CreateWithPile(
- LayerTreeImpl* tree_impl, int id, scoped_refptr<PicturePileImpl> pile) {
- return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, pile));
+ // Create layer from a raster source that covers the entire layer.
+ static scoped_ptr<FakePictureLayerImpl> CreateWithRasterSource(
+ LayerTreeImpl* tree_impl,
+ int id,
+ scoped_refptr<RasterSource> raster_source) {
+ return make_scoped_ptr(
+ new FakePictureLayerImpl(tree_impl, id, raster_source));
}
- // Create layer from a pile that only covers part of the layer.
- static scoped_ptr<FakePictureLayerImpl> CreateWithPartialPile(
+ // Create layer from a raster source that only covers part of the layer.
+ static scoped_ptr<FakePictureLayerImpl> CreateWithPartialRasterSource(
LayerTreeImpl* tree_impl,
int id,
- scoped_refptr<PicturePileImpl> pile,
+ scoped_refptr<RasterSource> raster_source,
const gfx::Size& layer_bounds) {
return make_scoped_ptr(
- new FakePictureLayerImpl(tree_impl, id, pile, layer_bounds));
+ new FakePictureLayerImpl(tree_impl, id, raster_source, layer_bounds));
}
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
@@ -50,6 +53,11 @@ class FakePictureLayerImpl : public PictureLayerImpl {
use_set_valid_tile_priorities_flag_ = true;
}
+ size_t CountTilesRequired(
+ TileRequirementCheck is_tile_required_callback) const;
+ size_t CountTilesRequiredForActivation() const;
+ size_t CountTilesRequiredForDraw() const;
+
using PictureLayerImpl::AddTiling;
using PictureLayerImpl::CleanUpTilingsOnActiveLayer;
using PictureLayerImpl::CanHaveTilings;
@@ -58,7 +66,7 @@ class FakePictureLayerImpl : public PictureLayerImpl {
using PictureLayerImpl::GetViewportForTilePriorityInContentSpace;
using PictureLayerImpl::SanityCheckTilingState;
using PictureLayerImpl::GetRecycledTwinLayer;
- using PictureLayerImpl::UpdatePile;
+ using PictureLayerImpl::UpdateRasterSource;
using PictureLayerImpl::UpdateIdealScales;
using PictureLayerImpl::MaximumTilingContentsScale;
@@ -82,8 +90,8 @@ class FakePictureLayerImpl : public PictureLayerImpl {
size_t num_tilings() const { return tilings_->num_tilings(); }
PictureLayerTilingSet* tilings() { return tilings_.get(); }
- PicturePileImpl* pile() { return pile_.get(); }
- void SetPile(scoped_refptr<PicturePileImpl> pile);
+ RasterSource* raster_source() { return raster_source_.get(); }
+ void SetRasterSource(scoped_refptr<RasterSource> raster_source);
size_t append_quads_count() { return append_quads_count_; }
const Region& invalidation() const { return invalidation_; }
@@ -113,13 +121,12 @@ class FakePictureLayerImpl : public PictureLayerImpl {
}
protected:
- FakePictureLayerImpl(
- LayerTreeImpl* tree_impl,
- int id,
- scoped_refptr<PicturePileImpl> pile);
FakePictureLayerImpl(LayerTreeImpl* tree_impl,
int id,
- scoped_refptr<PicturePileImpl> pile,
+ scoped_refptr<RasterSource> raster_source);
+ FakePictureLayerImpl(LayerTreeImpl* tree_impl,
+ int id,
+ scoped_refptr<RasterSource> raster_source,
const gfx::Size& layer_bounds);
FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
« no previous file with comments | « cc/test/fake_output_surface_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