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

Side by Side Diff: cc/layer_tree_host.h

Issue 11414017: cc: handling debug settings in new LayerTreeDebugState structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
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 CC_LAYER_TREE_HOST_H_ 5 #ifndef CC_LAYER_TREE_HOST_H_
6 #define CC_LAYER_TREE_HOST_H_ 6 #define CC_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class HeadsUpDisplayLayer; 49 class HeadsUpDisplayLayer;
50 class Region; 50 class Region;
51 struct ScrollAndScaleSet; 51 struct ScrollAndScaleSet;
52 52
53 struct CC_EXPORT LayerTreeSettings { 53 struct CC_EXPORT LayerTreeSettings {
54 LayerTreeSettings(); 54 LayerTreeSettings();
55 ~LayerTreeSettings(); 55 ~LayerTreeSettings();
56 56
57 bool acceleratePainting; 57 bool acceleratePainting;
58 bool showDebugBorders; 58 bool showDebugBorders;
59 bool showPlatformLayerTree;
60 bool showPaintRects;
61 bool showPropertyChangedRects;
62 bool showSurfaceDamageRects;
63 bool showScreenSpaceRects;
64 bool showReplicaScreenSpaceRects;
65 bool showOccludingRects;
66 bool showNonOccludingRects;
67 bool renderVSyncEnabled; 59 bool renderVSyncEnabled;
68 bool perTilePaintingEnabled; 60 bool perTilePaintingEnabled;
69 bool partialSwapEnabled; 61 bool partialSwapEnabled;
70 bool acceleratedAnimationEnabled; 62 bool acceleratedAnimationEnabled;
71 bool pageScalePinchZoomEnabled; 63 bool pageScalePinchZoomEnabled;
72 bool backgroundColorInsteadOfCheckerboard; 64 bool backgroundColorInsteadOfCheckerboard;
73 bool showOverdrawInTracing; 65 bool showOverdrawInTracing;
74 double refreshRate; 66 double refreshRate;
75 size_t maxPartialTextureUpdates; 67 size_t maxPartialTextureUpdates;
76 gfx::Size defaultTileSize; 68 gfx::Size defaultTileSize;
77 gfx::Size maxUntiledLayerSize; 69 gfx::Size maxUntiledLayerSize;
78 gfx::Size minimumOcclusionTrackingSize; 70 gfx::Size minimumOcclusionTrackingSize;
79
80 bool showDebugInfo() const { return showPlatformLayerTree || showDebugRects( ); }
81 bool showDebugRects() const { return showPaintRects || showPropertyChangedRe cts || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceR ects || showOccludingRects || showNonOccludingRects; }
82 }; 71 };
83 72
84 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost 73 // Provides information on an Impl's rendering capabilities back to the LayerTre eHost
85 struct CC_EXPORT RendererCapabilities { 74 struct CC_EXPORT RendererCapabilities {
86 RendererCapabilities(); 75 RendererCapabilities();
87 ~RendererCapabilities(); 76 ~RendererCapabilities();
88 77
89 GLenum bestTextureFormat; 78 GLenum bestTextureFormat;
90 bool contextHasCachedFrontBuffer; 79 bool contextHasCachedFrontBuffer;
91 bool usingPartialSwap; 80 bool usingPartialSwap;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 198
210 // RateLimitClient implementation 199 // RateLimitClient implementation
211 virtual void rateLimit() OVERRIDE; 200 virtual void rateLimit() OVERRIDE;
212 201
213 bool bufferedUpdates(); 202 bool bufferedUpdates();
214 bool requestPartialTextureUpdate(); 203 bool requestPartialTextureUpdate();
215 204
216 void setDeviceScaleFactor(float); 205 void setDeviceScaleFactor(float);
217 float deviceScaleFactor() const { return m_deviceScaleFactor; } 206 float deviceScaleFactor() const { return m_deviceScaleFactor; }
218 207
219 void setShowFPSCounter(bool show);
220 void setFontAtlas(scoped_ptr<FontAtlas>);
221
222 HeadsUpDisplayLayer* hudLayer() const { return m_hudLayer.get(); } 208 HeadsUpDisplayLayer* hudLayer() const { return m_hudLayer.get(); }
209 HeadsUpDisplayLayer* requestHUDLayer();
223 210
224 Proxy* proxy() const { return m_proxy.get(); } 211 Proxy* proxy() const { return m_proxy.get(); }
225 212
226 protected: 213 protected:
227 LayerTreeHost(LayerTreeHostClient*, const LayerTreeSettings&); 214 LayerTreeHost(LayerTreeHostClient*, const LayerTreeSettings&);
228 bool initialize(scoped_ptr<Thread> implThread); 215 bool initialize(scoped_ptr<Thread> implThread);
229 216
230 private: 217 private:
231 typedef std::vector<scoped_refptr<Layer> > LayerList; 218 typedef std::vector<scoped_refptr<Layer> > LayerList;
232 219
233 void initializeRenderer(); 220 void initializeRenderer();
234 221
235 void update(Layer*, ResourceUpdateQueue&, const OcclusionTracker*); 222 void update(Layer*, ResourceUpdateQueue&, const OcclusionTracker*);
236 bool paintLayerContents(const LayerList&, ResourceUpdateQueue&); 223 bool paintLayerContents(const LayerList&, ResourceUpdateQueue&);
237 bool paintMasksForRenderSurface(Layer*, ResourceUpdateQueue&); 224 bool paintMasksForRenderSurface(Layer*, ResourceUpdateQueue&);
238 225
239 void updateLayers(Layer*, ResourceUpdateQueue&); 226 void updateLayers(Layer*, ResourceUpdateQueue&);
240 void triggerPrepaint(); 227 void triggerPrepaint();
241 228
242 void prioritizeTextures(const LayerList&, OverdrawMetrics&); 229 void prioritizeTextures(const LayerList&, OverdrawMetrics&);
243 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); 230 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes);
244 void setPrioritiesForLayers(const LayerList&); 231 void setPrioritiesForLayers(const LayerList&);
245 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); 232 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList);
246 233
247 void animateLayers(base::TimeTicks monotonicTime); 234 void animateLayers(base::TimeTicks monotonicTime);
248 bool animateLayersRecursive(Layer* current, base::TimeTicks time); 235 bool animateLayersRecursive(Layer* current, base::TimeTicks time);
249 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, base: :Time wallClockTime); 236 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, base: :Time wallClockTime);
250 237
251 void createHUDLayerIfNeeded();
252
253 bool m_animating; 238 bool m_animating;
254 bool m_needsAnimateLayers; 239 bool m_needsAnimateLayers;
255 240
256 base::CancelableClosure m_prepaintCallback; 241 base::CancelableClosure m_prepaintCallback;
257 242
258 LayerTreeHostClient* m_client; 243 LayerTreeHostClient* m_client;
259 scoped_ptr<Proxy> m_proxy; 244 scoped_ptr<Proxy> m_proxy;
260 245
261 int m_commitNumber; 246 int m_commitNumber;
262 RenderingStats m_renderingStats; 247 RenderingStats m_renderingStats;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 size_t m_partialTextureUpdateRequests; 280 size_t m_partialTextureUpdateRequests;
296 281
297 static bool s_needsFilterContext; 282 static bool s_needsFilterContext;
298 283
299 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 284 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
300 }; 285 };
301 286
302 } // namespace cc 287 } // namespace cc
303 288
304 #endif // CC_LAYER_TREE_HOST_H_ 289 #endif // CC_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698