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

Side by Side Diff: cc/test/fake_picture_layer_impl.h

Issue 881083002: cc: Clean up tilings in UpdateTiles as well as in AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } 114 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; }
115 115
116 void CreateAllTiles(); 116 void CreateAllTiles();
117 void SetAllTilesVisible(); 117 void SetAllTilesVisible();
118 void SetAllTilesReady(); 118 void SetAllTilesReady();
119 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); 119 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
120 void SetTileReady(Tile* tile); 120 void SetTileReady(Tile* tile);
121 void ResetAllTilesPriorities(); 121 void ResetAllTilesPriorities();
122 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } 122 PictureLayerTilingSet* GetTilings() { return tilings_.get(); }
123 123
124 // Add the given tiling as a "used" tiling during AppendQuads. This ensures
125 // that future calls to UpdateTiles don't delete the tiling.
126 void AddUsedTiling(PictureLayerTiling* tiling) {
127 last_append_quads_tilings_.push_back(tiling);
128 }
129
124 size_t release_resources_count() const { return release_resources_count_; } 130 size_t release_resources_count() const { return release_resources_count_; }
125 void reset_release_resources_count() { release_resources_count_ = 0; } 131 void reset_release_resources_count() { release_resources_count_ = 0; }
126 132
127 void ReleaseResources() override; 133 void ReleaseResources() override;
128 134
129 bool only_used_low_res_last_append_quads() const { 135 bool only_used_low_res_last_append_quads() const {
130 return only_used_low_res_last_append_quads_; 136 return only_used_low_res_last_append_quads_;
131 } 137 }
132 138
133 protected: 139 protected:
(...skipping 14 matching lines...) Expand all
148 size_t append_quads_count_; 154 size_t append_quads_count_;
149 size_t did_become_active_call_count_; 155 size_t did_become_active_call_count_;
150 bool has_valid_tile_priorities_; 156 bool has_valid_tile_priorities_;
151 bool use_set_valid_tile_priorities_flag_; 157 bool use_set_valid_tile_priorities_flag_;
152 size_t release_resources_count_; 158 size_t release_resources_count_;
153 }; 159 };
154 160
155 } // namespace cc 161 } // namespace cc
156 162
157 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 163 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW
« cc/layers/picture_layer_impl_unittest.cc ('K') | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698