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 gfx::RectF scissorRectInRenderPassSpace; | 45 gfx::RectF scissorRectInRenderPassSpace; |
46 }; | 46 }; |
47 | 47 |
48 protected: | 48 protected: |
49 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); | 49 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); |
50 | 50 |
51 class CachedResource : public ScopedResource { | 51 class CachedResource : public ScopedResource { |
52 public: | 52 public: |
53 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { | 53 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { |
(...skipping 11 matching lines...) Expand all Loading... |
65 { | 65 { |
66 } | 66 } |
67 | 67 |
68 private: | 68 private: |
69 bool m_isComplete; | 69 bool m_isComplete; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(CachedResource); | 71 DISALLOW_COPY_AND_ASSIGN(CachedResource); |
72 }; | 72 }; |
73 | 73 |
74 static gfx::RectF quadVertexRect(); | 74 static gfx::RectF quadVertexRect(); |
75 static void quadRectTransform(WebKit::WebTransformationMatrix* quadRectTrans
form, const WebKit::WebTransformationMatrix& quadTransform, const gfx::RectF& qu
adRect); | 75 static void quadRectTransform(gfx::Transform* quadRectTransform, const gfx::
Transform& quadTransform, const gfx::RectF& quadRect); |
76 static void initializeMatrices(DrawingFrame&, const gfx::Rect& drawRect, boo
l flipY); | 76 static void initializeMatrices(DrawingFrame&, const gfx::Rect& drawRect, boo
l flipY); |
77 static gfx::Rect moveScissorToWindowSpace(const DrawingFrame&, gfx::RectF sc
issorRect); | 77 static gfx::Rect moveScissorToWindowSpace(const DrawingFrame&, gfx::RectF sc
issorRect); |
78 | 78 |
79 bool haveCachedResources(RenderPass::Id) const; | 79 bool haveCachedResources(RenderPass::Id) const; |
80 static gfx::Size renderPassTextureSize(const RenderPass*); | 80 static gfx::Size renderPassTextureSize(const RenderPass*); |
81 static GLenum renderPassTextureFormat(const RenderPass*); | 81 static GLenum renderPassTextureFormat(const RenderPass*); |
82 | 82 |
83 void drawRenderPass(DrawingFrame&, const RenderPass*); | 83 void drawRenderPass(DrawingFrame&, const RenderPass*); |
84 bool useRenderPass(DrawingFrame&, const RenderPass*); | 84 bool useRenderPass(DrawingFrame&, const RenderPass*); |
85 | 85 |
(...skipping 10 matching lines...) Expand all Loading... |
96 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; | 96 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; |
97 ResourceProvider* m_resourceProvider; | 97 ResourceProvider* m_resourceProvider; |
98 | 98 |
99 private: | 99 private: |
100 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 100 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace cc | 103 } // namespace cc |
104 | 104 |
105 #endif // CC_DIRECT_RENDERER_H_ | 105 #endif // CC_DIRECT_RENDERER_H_ |
OLD | NEW |