OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 | 5 |
6 #ifndef RenderSurfaceChromium_h | 6 #ifndef RenderSurfaceChromium_h |
7 #define RenderSurfaceChromium_h | 7 #define RenderSurfaceChromium_h |
8 | 8 |
9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
| 11 #include "base/basictypes.h" |
11 #include "FloatRect.h" | 12 #include "FloatRect.h" |
12 #include "IntRect.h" | 13 #include "IntRect.h" |
13 #include <public/WebTransformationMatrix.h> | 14 #include <public/WebTransformationMatrix.h> |
14 #include <wtf/Noncopyable.h> | |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 class LayerChromium; | 18 class LayerChromium; |
19 | 19 |
20 class RenderSurfaceChromium { | 20 class RenderSurfaceChromium { |
21 WTF_MAKE_NONCOPYABLE(RenderSurfaceChromium); | |
22 public: | 21 public: |
23 explicit RenderSurfaceChromium(LayerChromium*); | 22 explicit RenderSurfaceChromium(LayerChromium*); |
24 ~RenderSurfaceChromium(); | 23 ~RenderSurfaceChromium(); |
25 | 24 |
26 // Returns the rect that encloses the RenderSurface including any reflection
. | 25 // Returns the rect that encloses the RenderSurface including any reflection
. |
27 FloatRect drawableContentRect() const; | 26 FloatRect drawableContentRect() const; |
28 | 27 |
29 const IntRect& contentRect() const { return m_contentRect; } | 28 const IntRect& contentRect() const { return m_contentRect; } |
30 void setContentRect(const IntRect& contentRect) { m_contentRect = contentRec
t; } | 29 void setContentRect(const IntRect& contentRect) { m_contentRect = contentRec
t; } |
31 | 30 |
(...skipping 28 matching lines...) Expand all Loading... |
60 Vector<RefPtr<LayerChromium> >& layerList() { return m_layerList; } | 59 Vector<RefPtr<LayerChromium> >& layerList() { return m_layerList; } |
61 // A no-op since DelegatedRendererLayers on the main thread don't have any | 60 // A no-op since DelegatedRendererLayers on the main thread don't have any |
62 // RenderPasses so they can't contribute to a surface. | 61 // RenderPasses so they can't contribute to a surface. |
63 void addContributingDelegatedRenderPassLayer(LayerChromium*) { } | 62 void addContributingDelegatedRenderPassLayer(LayerChromium*) { } |
64 void clearLayerLists() { m_layerList.clear(); } | 63 void clearLayerLists() { m_layerList.clear(); } |
65 | 64 |
66 void setNearestAncestorThatMovesPixels(RenderSurfaceChromium* surface) { m_n
earestAncestorThatMovesPixels = surface; } | 65 void setNearestAncestorThatMovesPixels(RenderSurfaceChromium* surface) { m_n
earestAncestorThatMovesPixels = surface; } |
67 const RenderSurfaceChromium* nearestAncestorThatMovesPixels() const { return
m_nearestAncestorThatMovesPixels; } | 66 const RenderSurfaceChromium* nearestAncestorThatMovesPixels() const { return
m_nearestAncestorThatMovesPixels; } |
68 | 67 |
69 private: | 68 private: |
| 69 friend struct CCLayerIteratorActions; |
| 70 |
70 LayerChromium* m_owningLayer; | 71 LayerChromium* m_owningLayer; |
71 | 72 |
72 // Uses this surface's space. | 73 // Uses this surface's space. |
73 IntRect m_contentRect; | 74 IntRect m_contentRect; |
74 | 75 |
75 float m_drawOpacity; | 76 float m_drawOpacity; |
76 bool m_drawOpacityIsAnimating; | 77 bool m_drawOpacityIsAnimating; |
77 WebKit::WebTransformationMatrix m_drawTransform; | 78 WebKit::WebTransformationMatrix m_drawTransform; |
78 WebKit::WebTransformationMatrix m_screenSpaceTransform; | 79 WebKit::WebTransformationMatrix m_screenSpaceTransform; |
79 WebKit::WebTransformationMatrix m_replicaDrawTransform; | 80 WebKit::WebTransformationMatrix m_replicaDrawTransform; |
80 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; | 81 WebKit::WebTransformationMatrix m_replicaScreenSpaceTransform; |
81 bool m_targetSurfaceTransformsAreAnimating; | 82 bool m_targetSurfaceTransformsAreAnimating; |
82 bool m_screenSpaceTransformsAreAnimating; | 83 bool m_screenSpaceTransformsAreAnimating; |
83 | 84 |
84 // Uses the space of the surface's target surface. | 85 // Uses the space of the surface's target surface. |
85 IntRect m_clipRect; | 86 IntRect m_clipRect; |
86 | 87 |
87 Vector<RefPtr<LayerChromium> > m_layerList; | 88 Vector<RefPtr<LayerChromium> > m_layerList; |
88 | 89 |
89 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going | 90 // The nearest ancestor target surface that will contain the contents of thi
s surface, and that is going |
90 // to move pixels within the surface (such as with a blur). This can point t
o itself. | 91 // to move pixels within the surface (such as with a blur). This can point t
o itself. |
91 RenderSurfaceChromium* m_nearestAncestorThatMovesPixels; | 92 RenderSurfaceChromium* m_nearestAncestorThatMovesPixels; |
92 | 93 |
93 // For CCLayerIteratorActions | 94 // For CCLayerIteratorActions |
94 int m_targetRenderSurfaceLayerIndexHistory; | 95 int m_targetRenderSurfaceLayerIndexHistory; |
95 int m_currentLayerIndexHistory; | 96 int m_currentLayerIndexHistory; |
96 friend struct CCLayerIteratorActions; | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceChromium); |
97 }; | 99 }; |
98 | 100 |
99 } | 101 } |
100 #endif // USE(ACCELERATED_COMPOSITING) | 102 #endif // USE(ACCELERATED_COMPOSITING) |
101 | 103 |
102 #endif | 104 #endif |
OLD | NEW |