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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 23548022: [cc] Evict UIResources when the renderer is not visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix names Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_TREES_LAYER_TREE_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // These should be called by LayerImpl's ctor/dtor. 173 // These should be called by LayerImpl's ctor/dtor.
174 void RegisterLayer(LayerImpl* layer); 174 void RegisterLayer(LayerImpl* layer);
175 void UnregisterLayer(LayerImpl* layer); 175 void UnregisterLayer(LayerImpl* layer);
176 176
177 AnimationRegistrar* animationRegistrar() const; 177 AnimationRegistrar* animationRegistrar() const;
178 178
179 void PushPersistedState(LayerTreeImpl* pending_tree); 179 void PushPersistedState(LayerTreeImpl* pending_tree);
180 180
181 void DidBecomeActive(); 181 void DidBecomeActive();
182 182
183 void SetUIResourceEvictionCountRecreated(
184 uint64 ui_resource_eviction_count_recreated);
185 uint64 ui_resource_eviction_count_recreated() const {
186 return ui_resource_eviction_count_recreated_;
187 }
188
183 bool ContentsTexturesPurged() const; 189 bool ContentsTexturesPurged() const;
184 void SetContentsTexturesPurged(); 190 void SetContentsTexturesPurged();
185 void ResetContentsTexturesPurged(); 191 void ResetContentsTexturesPurged();
186 192
187 // Set on the active tree when the viewport size recently changed 193 // Set on the active tree when the viewport size recently changed
188 // and the active tree's size is now out of date. 194 // and the active tree's size is now out of date.
189 bool ViewportSizeInvalid() const; 195 bool ViewportSizeInvalid() const;
190 void SetViewportSizeInvalid(); 196 void SetViewportSizeInvalid();
191 void ResetViewportSizeInvalid(); 197 void ResetViewportSizeInvalid();
192 198
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 243
238 std::vector<LayerImpl*> layers_with_copy_output_request_; 244 std::vector<LayerImpl*> layers_with_copy_output_request_;
239 245
240 // Persisted state for non-impl-side-painting. 246 // Persisted state for non-impl-side-painting.
241 int scrolling_layer_id_from_previous_tree_; 247 int scrolling_layer_id_from_previous_tree_;
242 248
243 // List of visible layers for the most recently prepared frame. Used for 249 // List of visible layers for the most recently prepared frame. Used for
244 // rendering and input event hit testing. 250 // rendering and input event hit testing.
245 LayerImplList render_surface_layer_list_; 251 LayerImplList render_surface_layer_list_;
246 252
253 // The UI resource eviction count most recently acked. This value is updated
254 // through ProcessUIResourceRequestQueue. If this value is not equal to
255 // |layer_tree_host_impl_|'s UI resource eviction count, then this tree may
256 // may reference evicted UI resources and cannot be drawn.
257 uint64 ui_resource_eviction_count_recreated_;
258
247 bool contents_textures_purged_; 259 bool contents_textures_purged_;
248 bool viewport_size_invalid_; 260 bool viewport_size_invalid_;
249 bool needs_update_draw_properties_; 261 bool needs_update_draw_properties_;
250 262
251 // In impl-side painting mode, this is true when the tree may contain 263 // In impl-side painting mode, this is true when the tree may contain
252 // structural differences relative to the active tree. 264 // structural differences relative to the active tree.
253 bool needs_full_tree_sync_; 265 bool needs_full_tree_sync_;
254 266
255 ui::LatencyInfo latency_info_; 267 ui::LatencyInfo latency_info_;
256 268
257 UIResourceRequestQueue ui_resource_request_queue_; 269 UIResourceRequestQueue ui_resource_request_queue_;
258 270
259 private: 271 private:
260 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 272 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
261 }; 273 };
262 274
263 } // namespace cc 275 } // namespace cc
264 276
265 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 277 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698