OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "cc/CCDrawQuad.h" | 29 #include "cc/CCDrawQuad.h" |
30 #include "cc/CCOcclusionTracker.h" | 30 #include "cc/CCOcclusionTracker.h" |
31 #include <wtf/PassOwnPtr.h> | 31 #include <wtf/PassOwnPtr.h> |
32 #include <wtf/Vector.h> | 32 #include <wtf/Vector.h> |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class CCLayerImpl; | 36 class CCLayerImpl; |
37 class CCRenderSurface; | 37 class CCRenderSurface; |
38 class CCSharedQuadState; | 38 class CCSharedQuadState; |
| 39 class Color; |
39 | 40 |
40 // A list of CCDrawQuad objects, sorted internally in front-to-back order. | 41 // A list of CCDrawQuad objects, sorted internally in front-to-back order. |
41 class CCQuadList : public Vector<OwnPtr<CCDrawQuad> > { | 42 class CCQuadList : public Vector<OwnPtr<CCDrawQuad> > { |
42 public: | 43 public: |
43 typedef reverse_iterator backToFrontIterator; | 44 typedef reverse_iterator backToFrontIterator; |
44 typedef const_reverse_iterator constBackToFrontIterator; | 45 typedef const_reverse_iterator constBackToFrontIterator; |
45 | 46 |
46 inline backToFrontIterator backToFrontBegin() { return rbegin(); } | 47 inline backToFrontIterator backToFrontBegin() { return rbegin(); } |
47 inline backToFrontIterator backToFrontEnd() { return rend(); } | 48 inline backToFrontIterator backToFrontEnd() { return rend(); } |
48 inline constBackToFrontIterator backToFrontBegin() const { return rbegin();
} | 49 inline constBackToFrontIterator backToFrontBegin() const { return rbegin();
} |
49 inline constBackToFrontIterator backToFrontEnd() const { return rend(); } | 50 inline constBackToFrontIterator backToFrontEnd() const { return rend(); } |
50 }; | 51 }; |
51 | 52 |
52 class CCRenderPass { | 53 class CCRenderPass { |
53 WTF_MAKE_NONCOPYABLE(CCRenderPass); | 54 WTF_MAKE_NONCOPYABLE(CCRenderPass); |
54 public: | 55 public: |
55 static PassOwnPtr<CCRenderPass> create(CCRenderSurface*); | 56 static PassOwnPtr<CCRenderPass> create(CCRenderSurface*); |
56 | 57 |
57 void appendQuadsForLayer(CCLayerImpl*, CCOcclusionTrackerImpl*, bool& usedCh
eckerboard); | 58 void appendQuadsForLayer(CCLayerImpl*, CCOcclusionTrackerImpl*, bool& usedCh
eckerboard); |
58 void appendQuadsForRenderSurfaceLayer(CCLayerImpl*); | 59 void appendQuadsForRenderSurfaceLayer(CCLayerImpl*); |
| 60 void appendQuadsToFillScreen(CCLayerImpl* rootLayer, const Color& screenBack
groundColor, const CCOcclusionTrackerImpl&); |
59 | 61 |
60 const CCQuadList& quadList() const { return m_quadList; } | 62 const CCQuadList& quadList() const { return m_quadList; } |
61 CCRenderSurface* targetSurface() const { return m_targetSurface; } | 63 CCRenderSurface* targetSurface() const { return m_targetSurface; } |
62 | 64 |
63 void setSurfaceDamageRect(const FloatRect& surfaceDamageRect) { m_surfaceDam
ageRect = surfaceDamageRect; } | 65 void setSurfaceDamageRect(const FloatRect& surfaceDamageRect) { m_surfaceDam
ageRect = surfaceDamageRect; } |
64 const FloatRect& surfaceDamageRect() const { return m_surfaceDamageRect; } | 66 const FloatRect& surfaceDamageRect() const { return m_surfaceDamageRect; } |
65 | 67 |
66 private: | 68 private: |
67 explicit CCRenderPass(CCRenderSurface*); | 69 explicit CCRenderPass(CCRenderSurface*); |
68 | 70 |
69 CCRenderSurface* m_targetSurface; | 71 CCRenderSurface* m_targetSurface; |
70 CCQuadList m_quadList; | 72 CCQuadList m_quadList; |
71 Vector<OwnPtr<CCSharedQuadState> > m_sharedQuadStateList; | 73 Vector<OwnPtr<CCSharedQuadState> > m_sharedQuadStateList; |
72 FloatRect m_surfaceDamageRect; | 74 FloatRect m_surfaceDamageRect; |
73 }; | 75 }; |
74 | 76 |
75 typedef Vector<OwnPtr<CCRenderPass> > CCRenderPassList; | 77 typedef Vector<OwnPtr<CCRenderPass> > CCRenderPassList; |
76 | 78 |
77 } | 79 } |
78 | 80 |
79 #endif | 81 #endif |
OLD | NEW |