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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class CC_EXPORT LayerTreeHost : public RateLimiterClient { | 75 class CC_EXPORT LayerTreeHost : public RateLimiterClient { |
76 public: | 76 public: |
77 static scoped_ptr<LayerTreeHost> create(LayerTreeHostClient*, const LayerTre
eSettings&, scoped_ptr<Thread> implThread); | 77 static scoped_ptr<LayerTreeHost> create(LayerTreeHostClient*, const LayerTre
eSettings&, scoped_ptr<Thread> implThread); |
78 virtual ~LayerTreeHost(); | 78 virtual ~LayerTreeHost(); |
79 | 79 |
80 void setSurfaceReady(); | 80 void setSurfaceReady(); |
81 | 81 |
82 // Returns true if any LayerTreeHost is alive. | 82 // Returns true if any LayerTreeHost is alive. |
83 static bool anyLayerTreeHostInstanceExists(); | 83 static bool anyLayerTreeHostInstanceExists(); |
84 | 84 |
85 static bool needsFilterContext() { return s_needsFilterContext; } | 85 void setNeedsFilterContext() { m_needsFilterContext = true; } |
86 static void setNeedsFilterContext(bool needsFilterContext) { s_needsFilterCo
ntext = needsFilterContext; } | 86 bool needsOffscreenContext() const { return m_needsFilterContext || settings
().acceleratePainting; } |
87 bool needsSharedContext() const { return needsFilterContext() || settings().
acceleratePainting; } | |
88 | 87 |
89 // LayerTreeHost interface to Proxy. | 88 // LayerTreeHost interface to Proxy. |
90 void willBeginFrame() { m_client->willBeginFrame(); } | 89 void willBeginFrame() { m_client->willBeginFrame(); } |
91 void didBeginFrame(); | 90 void didBeginFrame(); |
92 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); | 91 void updateAnimations(base::TimeTicks monotonicFrameBeginTime); |
93 void didStopFlinging(); | 92 void didStopFlinging(); |
94 void layout(); | 93 void layout(); |
95 void beginCommitOnImplThread(LayerTreeHostImpl*); | 94 void beginCommitOnImplThread(LayerTreeHostImpl*); |
96 void finishCommitOnImplThread(LayerTreeHostImpl*); | 95 void finishCommitOnImplThread(LayerTreeHostImpl*); |
97 void willCommit(); | 96 void willCommit(); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); | 221 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); |
223 void setPrioritiesForLayers(const LayerList&); | 222 void setPrioritiesForLayers(const LayerList&); |
224 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); | 223 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); |
225 | 224 |
226 void animateLayers(base::TimeTicks monotonicTime); | 225 void animateLayers(base::TimeTicks monotonicTime); |
227 bool animateLayersRecursive(Layer* current, base::TimeTicks time); | 226 bool animateLayersRecursive(Layer* current, base::TimeTicks time); |
228 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, base:
:Time wallClockTime); | 227 void setAnimationEventsRecursive(const AnimationEventsVector&, Layer*, base:
:Time wallClockTime); |
229 | 228 |
230 bool m_animating; | 229 bool m_animating; |
231 bool m_needsFullTreeSync; | 230 bool m_needsFullTreeSync; |
| 231 bool m_needsFilterContext; |
232 | 232 |
233 base::CancelableClosure m_prepaintCallback; | 233 base::CancelableClosure m_prepaintCallback; |
234 | 234 |
235 LayerTreeHostClient* m_client; | 235 LayerTreeHostClient* m_client; |
236 scoped_ptr<Proxy> m_proxy; | 236 scoped_ptr<Proxy> m_proxy; |
237 | 237 |
238 int m_commitNumber; | 238 int m_commitNumber; |
239 RenderingStats m_renderingStats; | 239 RenderingStats m_renderingStats; |
240 | 240 |
241 bool m_rendererInitialized; | 241 bool m_rendererInitialized; |
(...skipping 24 matching lines...) Expand all Loading... |
266 bool m_triggerIdleUpdates; | 266 bool m_triggerIdleUpdates; |
267 | 267 |
268 SkColor m_backgroundColor; | 268 SkColor m_backgroundColor; |
269 bool m_hasTransparentBackground; | 269 bool m_hasTransparentBackground; |
270 | 270 |
271 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 271 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
272 size_t m_partialTextureUpdateRequests; | 272 size_t m_partialTextureUpdateRequests; |
273 | 273 |
274 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 274 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
275 | 275 |
276 static bool s_needsFilterContext; | |
277 | |
278 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 276 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
279 }; | 277 }; |
280 | 278 |
281 } // namespace cc | 279 } // namespace cc |
282 | 280 |
283 #endif // CC_LAYER_TREE_HOST_H_ | 281 #endif // CC_LAYER_TREE_HOST_H_ |
OLD | NEW |