OLD | NEW |
---|---|
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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 class CCTextureUpdateQueue; | 44 class CCTextureUpdateQueue; |
45 class HeadsUpDisplayLayerChromium; | 45 class HeadsUpDisplayLayerChromium; |
46 class Region; | 46 class Region; |
47 struct CCScrollAndScaleSet; | 47 struct CCScrollAndScaleSet; |
48 | 48 |
49 struct CCLayerTreeSettings { | 49 struct CCLayerTreeSettings { |
50 CCLayerTreeSettings(); | 50 CCLayerTreeSettings(); |
51 ~CCLayerTreeSettings(); | 51 ~CCLayerTreeSettings(); |
52 | 52 |
53 bool acceleratePainting; | 53 bool acceleratePainting; |
54 bool showFPSCounter; | |
55 bool showPlatformLayerTree; | 54 bool showPlatformLayerTree; |
56 bool showPaintRects; | 55 bool showPaintRects; |
57 bool showPropertyChangedRects; | 56 bool showPropertyChangedRects; |
58 bool showSurfaceDamageRects; | 57 bool showSurfaceDamageRects; |
59 bool showScreenSpaceRects; | 58 bool showScreenSpaceRects; |
60 bool showReplicaScreenSpaceRects; | 59 bool showReplicaScreenSpaceRects; |
61 bool showOccludingRects; | 60 bool showOccludingRects; |
62 bool renderVSyncEnabled; | 61 bool renderVSyncEnabled; |
63 double refreshRate; | 62 double refreshRate; |
64 size_t maxPartialTextureUpdates; | 63 size_t maxPartialTextureUpdates; |
65 IntSize defaultTileSize; | 64 IntSize defaultTileSize; |
66 IntSize maxUntiledLayerSize; | 65 IntSize maxUntiledLayerSize; |
67 IntSize minimumOcclusionTrackingSize; | 66 IntSize minimumOcclusionTrackingSize; |
68 | 67 |
69 bool showDebugInfo() const { return showPlatformLayerTree || showFPSCounter || showDebugRects(); } | 68 bool showDebugInfo() const { return showPlatformLayerTree || showDebugRects( ); } |
70 bool showDebugRects() const { return showPaintRects || showPropertyChangedRe cts || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceR ects || showOccludingRects; } | 69 bool showDebugRects() const { return showPaintRects || showPropertyChangedRe cts || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceR ects || showOccludingRects; } |
71 }; | 70 }; |
72 | 71 |
73 // Provides information on an Impl's rendering capabilities back to the CCLayerT reeHost | 72 // Provides information on an Impl's rendering capabilities back to the CCLayerT reeHost |
74 struct RendererCapabilities { | 73 struct RendererCapabilities { |
75 RendererCapabilities(); | 74 RendererCapabilities(); |
76 ~RendererCapabilities(); | 75 ~RendererCapabilities(); |
77 | 76 |
78 GC3Denum bestTextureFormat; | 77 GC3Denum bestTextureFormat; |
79 bool contextHasCachedFrontBuffer; | 78 bool contextHasCachedFrontBuffer; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 bool requestPartialTextureUpdate(); | 195 bool requestPartialTextureUpdate(); |
197 void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>); | 196 void deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture>); |
198 | 197 |
199 void setDeviceScaleFactor(float); | 198 void setDeviceScaleFactor(float); |
200 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 199 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
201 | 200 |
202 void setFontAtlas(scoped_ptr<CCFontAtlas>); | 201 void setFontAtlas(scoped_ptr<CCFontAtlas>); |
203 | 202 |
204 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } | 203 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } |
205 | 204 |
205 void setShowFPSCounter(bool show); | |
206 | |
206 protected: | 207 protected: |
207 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); | 208 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); |
208 bool initialize(); | 209 bool initialize(); |
209 | 210 |
210 private: | 211 private: |
211 typedef std::vector<scoped_refptr<LayerChromium> > LayerList; | 212 typedef std::vector<scoped_refptr<LayerChromium> > LayerList; |
212 | 213 |
213 void initializeRenderer(); | 214 void initializeRenderer(); |
214 | 215 |
215 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker* ); | 216 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker* ); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; | 250 scoped_ptr<CCPrioritizedTexture> m_surfaceMemoryPlaceholder; |
250 | 251 |
251 CCLayerTreeSettings m_settings; | 252 CCLayerTreeSettings m_settings; |
252 | 253 |
253 IntSize m_layoutViewportSize; | 254 IntSize m_layoutViewportSize; |
254 IntSize m_deviceViewportSize; | 255 IntSize m_deviceViewportSize; |
255 float m_deviceScaleFactor; | 256 float m_deviceScaleFactor; |
256 | 257 |
257 bool m_visible; | 258 bool m_visible; |
258 | 259 |
260 bool m_showFPSCounter; | |
nduca
2012/10/20 19:49:41
why are you storing this?
| |
261 | |
259 typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimi ter> > RateLimiterMap; | 262 typedef base::hash_map<WebKit::WebGraphicsContext3D*, scoped_refptr<RateLimi ter> > RateLimiterMap; |
260 RateLimiterMap m_rateLimiters; | 263 RateLimiterMap m_rateLimiters; |
261 | 264 |
262 float m_pageScaleFactor; | 265 float m_pageScaleFactor; |
263 float m_minPageScaleFactor, m_maxPageScaleFactor; | 266 float m_minPageScaleFactor, m_maxPageScaleFactor; |
264 WebKit::WebTransformationMatrix m_implTransform; | 267 WebKit::WebTransformationMatrix m_implTransform; |
265 bool m_triggerIdleUpdates; | 268 bool m_triggerIdleUpdates; |
266 | 269 |
267 SkColor m_backgroundColor; | 270 SkColor m_backgroundColor; |
268 bool m_hasTransparentBackground; | 271 bool m_hasTransparentBackground; |
269 | 272 |
270 typedef ScopedPtrVector<CCPrioritizedTexture> TextureList; | 273 typedef ScopedPtrVector<CCPrioritizedTexture> TextureList; |
271 TextureList m_deleteTextureAfterCommitList; | 274 TextureList m_deleteTextureAfterCommitList; |
272 size_t m_partialTextureUpdateRequests; | 275 size_t m_partialTextureUpdateRequests; |
273 | 276 |
274 static bool s_needsFilterContext; | 277 static bool s_needsFilterContext; |
275 | 278 |
276 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); | 279 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); |
277 }; | 280 }; |
278 | 281 |
279 } // namespace cc | 282 } // namespace cc |
280 | 283 |
281 #endif | 284 #endif |
OLD | NEW |