| 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 CCLayerTreeHostImpl_h | 5 #ifndef CCLayerTreeHostImpl_h |
| 6 #define CCLayerTreeHostImpl_h | 6 #define CCLayerTreeHostImpl_h |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // Iterates in draw order, so that when a surface is removed, and its | 254 // Iterates in draw order, so that when a surface is removed, and its |
| 255 // target becomes empty, then its target can be removed also. | 255 // target becomes empty, then its target can be removed also. |
| 256 size_t renderPassListBegin(const CCRenderPassList&) const { return 0; } | 256 size_t renderPassListBegin(const CCRenderPassList&) const { return 0; } |
| 257 size_t renderPassListEnd(const CCRenderPassList& list) const { return li
st.size(); } | 257 size_t renderPassListEnd(const CCRenderPassList& list) const { return li
st.size(); } |
| 258 size_t renderPassListNext(size_t it) const { return it + 1; } | 258 size_t renderPassListNext(size_t it) const { return it + 1; } |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 template<typename RenderPassCuller> | 261 template<typename RenderPassCuller> |
| 262 static void removeRenderPasses(RenderPassCuller, FrameData&); | 262 static void removeRenderPasses(RenderPassCuller, FrameData&); |
| 263 | 263 |
| 264 void setShowFPSCounter(bool show); |
| 265 bool showFPSCounter() const; |
| 266 |
| 264 protected: | 267 protected: |
| 265 CCLayerTreeHostImpl(const CCLayerTreeSettings&, CCLayerTreeHostImplClient*); | 268 CCLayerTreeHostImpl(const CCLayerTreeSettings&, CCLayerTreeHostImplClient*); |
| 266 | 269 |
| 267 void animatePageScale(double monotonicTime); | 270 void animatePageScale(double monotonicTime); |
| 268 void animateScrollbars(double monotonicTime); | 271 void animateScrollbars(double monotonicTime); |
| 269 | 272 |
| 270 // Exposed for testing. | 273 // Exposed for testing. |
| 271 void calculateRenderSurfaceLayerList(CCLayerList&); | 274 void calculateRenderSurfaceLayerList(CCLayerList&); |
| 272 | 275 |
| 273 // Virtual for testing. | 276 // Virtual for testing. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 IntSize m_layoutViewportSize; | 321 IntSize m_layoutViewportSize; |
| 319 IntSize m_deviceViewportSize; | 322 IntSize m_deviceViewportSize; |
| 320 float m_deviceScaleFactor; | 323 float m_deviceScaleFactor; |
| 321 bool m_visible; | 324 bool m_visible; |
| 322 bool m_contentsTexturesPurged; | 325 bool m_contentsTexturesPurged; |
| 323 size_t m_memoryAllocationLimitBytes; | 326 size_t m_memoryAllocationLimitBytes; |
| 324 | 327 |
| 325 SkColor m_backgroundColor; | 328 SkColor m_backgroundColor; |
| 326 bool m_hasTransparentBackground; | 329 bool m_hasTransparentBackground; |
| 327 | 330 |
| 331 bool m_showFPSCounter; |
| 332 |
| 328 // If this is true, it is necessary to traverse the layer tree ticking the a
nimators. | 333 // If this is true, it is necessary to traverse the layer tree ticking the a
nimators. |
| 329 bool m_needsAnimateLayers; | 334 bool m_needsAnimateLayers; |
| 330 bool m_pinchGestureActive; | 335 bool m_pinchGestureActive; |
| 331 IntPoint m_previousPinchAnchor; | 336 IntPoint m_previousPinchAnchor; |
| 332 | 337 |
| 333 scoped_ptr<CCPageScaleAnimation> m_pageScaleAnimation; | 338 scoped_ptr<CCPageScaleAnimation> m_pageScaleAnimation; |
| 334 | 339 |
| 335 // This is used for ticking animations slowly when hidden. | 340 // This is used for ticking animations slowly when hidden. |
| 336 scoped_ptr<CCLayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; | 341 scoped_ptr<CCLayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; |
| 337 | 342 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 348 | 353 |
| 349 size_t m_numImplThreadScrolls; | 354 size_t m_numImplThreadScrolls; |
| 350 size_t m_numMainThreadScrolls; | 355 size_t m_numMainThreadScrolls; |
| 351 | 356 |
| 352 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHostImpl); | 357 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHostImpl); |
| 353 }; | 358 }; |
| 354 | 359 |
| 355 } // namespace cc | 360 } // namespace cc |
| 356 | 361 |
| 357 #endif | 362 #endif |
| OLD | NEW |