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

Unified Diff: cc/test/fake_picture_layer_impl.cc

Issue 2468023002: Don't free non-tile resources on GPU rasterization toggle (Closed)
Patch Set: fix unittest Created 4 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_picture_layer_impl.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 65297112fba8523cf1e11f2f2ed636b4a721272e..f32669aad5c17897f54e138e26b6a23e49052789 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -19,12 +19,7 @@ FakePictureLayerImpl::FakePictureLayerImpl(
int id,
scoped_refptr<RasterSource> raster_source,
bool is_mask)
- : PictureLayerImpl(tree_impl, id, is_mask),
- 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) {
+ : PictureLayerImpl(tree_impl, id, is_mask) {
SetBounds(raster_source->GetSize());
SetRasterSourceOnPending(raster_source, Region());
}
@@ -35,12 +30,7 @@ FakePictureLayerImpl::FakePictureLayerImpl(
scoped_refptr<RasterSource> raster_source,
bool is_mask,
const gfx::Size& layer_bounds)
- : PictureLayerImpl(tree_impl, id, is_mask),
- 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) {
+ : PictureLayerImpl(tree_impl, id, is_mask) {
SetBounds(layer_bounds);
SetRasterSourceOnPending(raster_source, Region());
}
@@ -48,12 +38,7 @@ FakePictureLayerImpl::FakePictureLayerImpl(
FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl,
int id,
bool is_mask)
- : PictureLayerImpl(tree_impl, id, is_mask),
- 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) {}
+ : PictureLayerImpl(tree_impl, id, is_mask) {}
std::unique_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
@@ -220,4 +205,9 @@ void FakePictureLayerImpl::ReleaseResources() {
++release_resources_count_;
}
+void FakePictureLayerImpl::ReleaseTileResources() {
+ PictureLayerImpl::ReleaseTileResources();
+ ++release_tile_resources_count_;
+}
+
} // namespace cc
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698