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

Side by Side Diff: cc/layer_tree_host.h

Issue 11273029: Throttle prepaints to avoid colliding with post-load work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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
« no previous file with comments | « no previous file | cc/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CCLayerTreeHost_h 5 #ifndef CCLayerTreeHost_h
6 #define CCLayerTreeHost_h 6 #define CCLayerTreeHost_h
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "IntRect.h" 10 #include "IntRect.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/cancelable_callback.h"
12 #include "base/hash_tables.h" 13 #include "base/hash_tables.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "cc/animation_events.h" 16 #include "cc/animation_events.h"
16 #include "cc/graphics_context.h" 17 #include "cc/graphics_context.h"
17 #include "cc/layer_tree_host_client.h" 18 #include "cc/layer_tree_host_client.h"
18 #include "cc/layer_tree_host_common.h" 19 #include "cc/layer_tree_host_common.h"
19 #include "cc/occlusion_tracker.h" 20 #include "cc/occlusion_tracker.h"
20 #include "cc/prioritized_texture_manager.h" 21 #include "cc/prioritized_texture_manager.h"
21 #include "cc/proxy.h" 22 #include "cc/proxy.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 private: 212 private:
212 typedef std::vector<scoped_refptr<Layer> > LayerList; 213 typedef std::vector<scoped_refptr<Layer> > LayerList;
213 214
214 void initializeRenderer(); 215 void initializeRenderer();
215 216
216 void update(Layer*, TextureUpdateQueue&, const OcclusionTracker*); 217 void update(Layer*, TextureUpdateQueue&, const OcclusionTracker*);
217 bool paintLayerContents(const LayerList&, TextureUpdateQueue&); 218 bool paintLayerContents(const LayerList&, TextureUpdateQueue&);
218 bool paintMasksForRenderSurface(Layer*, TextureUpdateQueue&); 219 bool paintMasksForRenderSurface(Layer*, TextureUpdateQueue&);
219 220
220 void updateLayers(Layer*, TextureUpdateQueue&); 221 void updateLayers(Layer*, TextureUpdateQueue&);
222 void triggerPrepaint();
221 223
222 void prioritizeTextures(const LayerList&, OverdrawMetrics&); 224 void prioritizeTextures(const LayerList&, OverdrawMetrics&);
223 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); 225 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes);
224 void setPrioritiesForLayers(const LayerList&); 226 void setPrioritiesForLayers(const LayerList&);
225 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); 227 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList);
226 228
227 void animateLayers(double monotonicTime); 229 void animateLayers(double monotonicTime);
228 bool animateLayersRecursive(Layer* current, double monotonicTime); 230 bool animateLayersRecursive(Layer* current, double monotonicTime);
229 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, doubl e wallClockTime); 231 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, doubl e wallClockTime);
230 232
231 bool m_animating; 233 bool m_animating;
232 bool m_needsAnimateLayers; 234 bool m_needsAnimateLayers;
233 235
236 base::CancelableClosure m_prepaintCallback;
237
234 LayerTreeHostClient* m_client; 238 LayerTreeHostClient* m_client;
235 239
236 int m_commitNumber; 240 int m_commitNumber;
237 RenderingStats m_renderingStats; 241 RenderingStats m_renderingStats;
238 242
239 scoped_ptr<Proxy> m_proxy; 243 scoped_ptr<Proxy> m_proxy;
240 bool m_rendererInitialized; 244 bool m_rendererInitialized;
241 bool m_contextLost; 245 bool m_contextLost;
242 int m_numTimesRecreateShouldFail; 246 int m_numTimesRecreateShouldFail;
243 int m_numFailedRecreateAttempts; 247 int m_numFailedRecreateAttempts;
(...skipping 29 matching lines...) Expand all
273 size_t m_partialTextureUpdateRequests; 277 size_t m_partialTextureUpdateRequests;
274 278
275 static bool s_needsFilterContext; 279 static bool s_needsFilterContext;
276 280
277 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 281 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
278 }; 282 };
279 283
280 } // namespace cc 284 } // namespace cc
281 285
282 #endif 286 #endif
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698