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

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: remove dup Created 5 years, 10 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
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MarkAllTilingsUsed() {
127 last_append_quads_tilings_.clear();
128 for (size_t i = 0; i < tilings_->num_tilings(); ++i)
129 last_append_quads_tilings_.push_back(tilings_->tiling_at(i));
130 }
131
124 size_t release_resources_count() const { return release_resources_count_; } 132 size_t release_resources_count() const { return release_resources_count_; }
125 void reset_release_resources_count() { release_resources_count_ = 0; } 133 void reset_release_resources_count() { release_resources_count_ = 0; }
126 134
127 void ReleaseResources() override; 135 void ReleaseResources() override;
128 136
129 bool only_used_low_res_last_append_quads() const { 137 bool only_used_low_res_last_append_quads() const {
130 return only_used_low_res_last_append_quads_; 138 return only_used_low_res_last_append_quads_;
131 } 139 }
132 140
133 protected: 141 protected:
(...skipping 14 matching lines...) Expand all
148 size_t append_quads_count_; 156 size_t append_quads_count_;
149 size_t did_become_active_call_count_; 157 size_t did_become_active_call_count_;
150 bool has_valid_tile_priorities_; 158 bool has_valid_tile_priorities_;
151 bool use_set_valid_tile_priorities_flag_; 159 bool use_set_valid_tile_priorities_flag_;
152 size_t release_resources_count_; 160 size_t release_resources_count_;
153 }; 161 };
154 162
155 } // namespace cc 163 } // namespace cc
156 164
157 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 165 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « 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