OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_DIRECT_RENDERER_H_ | 5 #ifndef CC_DIRECT_RENDERER_H_ |
6 #define CC_DIRECT_RENDERER_H_ | 6 #define CC_DIRECT_RENDERER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
10 #include "cc/renderer.h" | 10 #include "cc/renderer.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 DrawingFrame(); | 32 DrawingFrame(); |
33 ~DrawingFrame(); | 33 ~DrawingFrame(); |
34 | 34 |
35 const RenderPassIdHashMap* renderPassesById; | 35 const RenderPassIdHashMap* renderPassesById; |
36 const RenderPass* rootRenderPass; | 36 const RenderPass* rootRenderPass; |
37 const RenderPass* currentRenderPass; | 37 const RenderPass* currentRenderPass; |
38 const ScopedResource* currentTexture; | 38 const ScopedResource* currentTexture; |
39 | 39 |
40 gfx::RectF rootDamageRect; | 40 gfx::RectF rootDamageRect; |
41 | 41 |
42 WebKit::WebTransformationMatrix projectionMatrix; | 42 gfx::Transform projectionMatrix; |
43 WebKit::WebTransformationMatrix windowMatrix; | 43 gfx::Transform windowMatrix; |
44 bool flippedY; | 44 bool flippedY; |
45 }; | 45 }; |
46 | 46 |
47 protected: | 47 protected: |
48 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); | 48 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); |
49 | 49 |
50 class CachedResource : public ScopedResource { | 50 class CachedResource : public ScopedResource { |
51 public: | 51 public: |
52 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { | 52 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { |
53 return make_scoped_ptr(new CachedResource(resourceProvider)); | 53 return make_scoped_ptr(new CachedResource(resourceProvider)); |
(...skipping 10 matching lines...) Expand all Loading... |
64 { | 64 { |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |
68 bool m_isComplete; | 68 bool m_isComplete; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(CachedResource); | 70 DISALLOW_COPY_AND_ASSIGN(CachedResource); |
71 }; | 71 }; |
72 | 72 |
73 static gfx::RectF quadVertexRect(); | 73 static gfx::RectF quadVertexRect(); |
74 static void quadRectTransform(WebKit::WebTransformationMatrix* quadRectTrans
form, const WebKit::WebTransformationMatrix& quadTransform, const gfx::RectF& qu
adRect); | 74 static void quadRectTransform(gfx::Transform* quadRectTransform, const gfx::
Transform& quadTransform, const gfx::RectF& quadRect); |
75 static void initializeMatrices(DrawingFrame&, const gfx::Rect& drawRect, boo
l flipY); | 75 static void initializeMatrices(DrawingFrame&, const gfx::Rect& drawRect, boo
l flipY); |
76 static gfx::Rect moveScissorToWindowSpace(const DrawingFrame&, gfx::RectF sc
issorRect); | 76 static gfx::Rect moveScissorToWindowSpace(const DrawingFrame&, gfx::RectF sc
issorRect); |
77 static gfx::RectF computeScissorRectForRenderPass(const DrawingFrame& frame)
; | 77 static gfx::RectF computeScissorRectForRenderPass(const DrawingFrame& frame)
; |
78 void setScissorStateForQuad(const DrawingFrame& frame, const DrawQuad& quad)
; | 78 void setScissorStateForQuad(const DrawingFrame& frame, const DrawQuad& quad)
; |
79 void setScissorStateForQuadWithRenderPassScissor(const DrawingFrame& frame,
const DrawQuad& quad, const gfx::RectF& renderPassScissor, bool* shouldSkipQuad)
; | 79 void setScissorStateForQuadWithRenderPassScissor(const DrawingFrame& frame,
const DrawQuad& quad, const gfx::RectF& renderPassScissor, bool* shouldSkipQuad)
; |
80 | 80 |
81 bool haveCachedResources(RenderPass::Id) const; | 81 bool haveCachedResources(RenderPass::Id) const; |
82 static gfx::Size renderPassTextureSize(const RenderPass*); | 82 static gfx::Size renderPassTextureSize(const RenderPass*); |
83 static GLenum renderPassTextureFormat(const RenderPass*); | 83 static GLenum renderPassTextureFormat(const RenderPass*); |
84 | 84 |
(...skipping 15 matching lines...) Expand all Loading... |
100 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; | 100 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; |
101 ResourceProvider* m_resourceProvider; | 101 ResourceProvider* m_resourceProvider; |
102 | 102 |
103 private: | 103 private: |
104 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 104 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace cc | 107 } // namespace cc |
108 | 108 |
109 #endif // CC_DIRECT_RENDERER_H_ | 109 #endif // CC_DIRECT_RENDERER_H_ |
OLD | NEW |