| 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 CCLayerImpl_h | 5 #ifndef CCLayerImpl_h |
| 6 #define CCLayerImpl_h | 6 #define CCLayerImpl_h |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/logging.h" |
| 9 #include "cc/scoped_ptr_vector.h" | 10 #include "cc/scoped_ptr_vector.h" |
| 10 #include "CCInputHandler.h" | 11 #include "CCInputHandler.h" |
| 11 #include "CCLayerAnimationController.h" | 12 #include "CCLayerAnimationController.h" |
| 12 #include "CCRenderPass.h" | 13 #include "CCRenderPass.h" |
| 13 #include "CCRenderSurface.h" | 14 #include "CCRenderSurface.h" |
| 14 #include "CCResourceProvider.h" | 15 #include "CCResourceProvider.h" |
| 15 #include "CCSharedQuadState.h" | 16 #include "CCSharedQuadState.h" |
| 16 #include "FloatRect.h" | 17 #include "FloatRect.h" |
| 17 #include "IntRect.h" | 18 #include "IntRect.h" |
| 18 #include "Region.h" | 19 #include "Region.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 CCRenderSurface* renderSurface() const { return m_renderSurface.get(); } | 154 CCRenderSurface* renderSurface() const { return m_renderSurface.get(); } |
| 154 void createRenderSurface(); | 155 void createRenderSurface(); |
| 155 void clearRenderSurface() { m_renderSurface.reset(); } | 156 void clearRenderSurface() { m_renderSurface.reset(); } |
| 156 | 157 |
| 157 float drawOpacity() const { return m_drawOpacity; } | 158 float drawOpacity() const { return m_drawOpacity; } |
| 158 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } | 159 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } |
| 159 | 160 |
| 160 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } | 161 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } |
| 161 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI
sAnimating = drawOpacityIsAnimating; } | 162 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI
sAnimating = drawOpacityIsAnimating; } |
| 162 | 163 |
| 163 CCLayerImpl* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarget
->renderSurface()); return m_renderTarget; } | 164 CCLayerImpl* renderTarget() const { DCHECK(!m_renderTarget || m_renderTarget
->renderSurface()); return m_renderTarget; } |
| 164 void setRenderTarget(CCLayerImpl* target) { m_renderTarget = target; } | 165 void setRenderTarget(CCLayerImpl* target) { m_renderTarget = target; } |
| 165 | 166 |
| 166 void setBounds(const IntSize&); | 167 void setBounds(const IntSize&); |
| 167 const IntSize& bounds() const { return m_bounds; } | 168 const IntSize& bounds() const { return m_bounds; } |
| 168 | 169 |
| 169 const IntSize& contentBounds() const { return m_contentBounds; } | 170 const IntSize& contentBounds() const { return m_contentBounds; } |
| 170 void setContentBounds(const IntSize&); | 171 void setContentBounds(const IntSize&); |
| 171 | 172 |
| 172 const IntPoint& scrollPosition() const { return m_scrollPosition; } | 173 const IntPoint& scrollPosition() const { return m_scrollPosition; } |
| 173 void setScrollPosition(const IntPoint&); | 174 void setScrollPosition(const IntPoint&); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 390 |
| 390 // Manages scrollbars for this layer | 391 // Manages scrollbars for this layer |
| 391 scoped_ptr<CCScrollbarAnimationController> m_scrollbarAnimationController; | 392 scoped_ptr<CCScrollbarAnimationController> m_scrollbarAnimationController; |
| 392 }; | 393 }; |
| 393 | 394 |
| 394 void sortLayers(std::vector<CCLayerImpl*>::iterator first, std::vector<CCLayerIm
pl*>::iterator end, CCLayerSorter*); | 395 void sortLayers(std::vector<CCLayerImpl*>::iterator first, std::vector<CCLayerIm
pl*>::iterator end, CCLayerSorter*); |
| 395 | 396 |
| 396 } | 397 } |
| 397 | 398 |
| 398 #endif // CCLayerImpl_h | 399 #endif // CCLayerImpl_h |
| OLD | NEW |