| Index: cc/test/fake_picture_layer_impl.cc
|
| diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
|
| index 13b20ad2e3398ea5ebb3006d9d1eb638eda156fe..e546408ac2ba29e1b21e5a7c7f61e71150bdd0a9 100644
|
| --- a/cc/test/fake_picture_layer_impl.cc
|
| +++ b/cc/test/fake_picture_layer_impl.cc
|
| @@ -13,22 +13,24 @@ namespace cc {
|
| FakePictureLayerImpl::FakePictureLayerImpl(
|
| LayerTreeImpl* tree_impl,
|
| int id,
|
| - scoped_refptr<RasterSource> raster_source)
|
| + scoped_refptr<RasterSource> raster_source,
|
| + bool is_mask)
|
| : PictureLayerImpl(tree_impl, id),
|
| append_quads_count_(0),
|
| did_become_active_call_count_(0),
|
| has_valid_tile_priorities_(false),
|
| use_set_valid_tile_priorities_flag_(false),
|
| release_resources_count_(0) {
|
| - raster_source_ = raster_source;
|
| - SetBounds(raster_source_->GetSize());
|
| - SetContentBounds(raster_source_->GetSize());
|
| + SetBounds(raster_source->GetSize());
|
| + SetContentBounds(raster_source->GetSize());
|
| + SetRasterSourceOnPending(raster_source, Region(), is_mask);
|
| }
|
|
|
| FakePictureLayerImpl::FakePictureLayerImpl(
|
| LayerTreeImpl* tree_impl,
|
| int id,
|
| scoped_refptr<RasterSource> raster_source,
|
| + bool is_mask,
|
| const gfx::Size& layer_bounds)
|
| : PictureLayerImpl(tree_impl, id),
|
| append_quads_count_(0),
|
| @@ -36,9 +38,9 @@ FakePictureLayerImpl::FakePictureLayerImpl(
|
| has_valid_tile_priorities_(false),
|
| use_set_valid_tile_priorities_flag_(false),
|
| release_resources_count_(0) {
|
| - raster_source_ = raster_source;
|
| SetBounds(layer_bounds);
|
| SetContentBounds(layer_bounds);
|
| + SetRasterSourceOnPending(raster_source, Region(), is_mask);
|
| }
|
|
|
| FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id)
|
| @@ -55,6 +57,13 @@ scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
|
| return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id()));
|
| }
|
|
|
| +void FakePictureLayerImpl::PushPropertiesTo(LayerImpl* layer_impl) {
|
| + FakePictureLayerImpl* picture_layer_impl =
|
| + static_cast<FakePictureLayerImpl*>(layer_impl);
|
| + picture_layer_impl->fixed_tile_size_ = fixed_tile_size_;
|
| + PictureLayerImpl::PushPropertiesTo(layer_impl);
|
| +}
|
| +
|
| void FakePictureLayerImpl::AppendQuads(
|
| RenderPass* render_pass,
|
| const Occlusion& occlusion_in_content_space,
|
| @@ -99,15 +108,14 @@ PictureLayerTiling* FakePictureLayerImpl::LowResTiling() const {
|
| return result;
|
| }
|
|
|
| -void FakePictureLayerImpl::SetRasterSource(
|
| - scoped_refptr<RasterSource> raster_source) {
|
| - raster_source_.swap(raster_source);
|
| - if (tilings()) {
|
| - for (size_t i = 0; i < num_tilings(); ++i) {
|
| - tilings()->tiling_at(i)->UpdateTilesToCurrentRasterSource(
|
| - raster_source_.get(), Region(), raster_source_->GetSize());
|
| - }
|
| - }
|
| +void FakePictureLayerImpl::SetRasterSourceOnPending(
|
| + scoped_refptr<RasterSource> raster_source,
|
| + const Region& invalidation,
|
| + bool is_mask) {
|
| + DCHECK(layer_tree_impl()->IsPendingTree());
|
| + Region invalidation_temp = invalidation;
|
| + const PictureLayerTilingSet* pending_set = nullptr;
|
| + UpdateRasterSource(raster_source, &invalidation_temp, is_mask, pending_set);
|
| }
|
|
|
| void FakePictureLayerImpl::SetAllTilesVisible() {
|
|
|