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" |
11 #include "cc/resource_provider.h" | 11 #include "cc/resource_provider.h" |
12 #include "cc/scoped_resource.h" | 12 #include "cc/scoped_resource.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class ResourceProvider; | 16 class ResourceProvider; |
17 | 17 |
18 // This is the base class for code shared between the GL and software | 18 // This is the base class for code shared between the GL and software |
19 // renderer implementations. "Direct" refers to the fact that it does not | 19 // renderer implementations. "Direct" refers to the fact that it does not |
20 // delegate rendering to another compositor. | 20 // delegate rendering to another compositor. |
21 class CC_EXPORT DirectRenderer : public Renderer { | 21 class CC_EXPORT DirectRenderer : public Renderer { |
22 public: | 22 public: |
23 virtual ~DirectRenderer(); | 23 virtual ~DirectRenderer(); |
24 | 24 |
25 ResourceProvider* resourceProvider() const { return m_resourceProvider; } | 25 ResourceProvider* resourceProvider() const { return m_resourceProvider; } |
26 | 26 |
27 virtual void decideRenderPassAllocationsForFrame(const RenderPassList& rende
rPassesInDrawOrder) OVERRIDE; | 27 virtual void decideRenderPassAllocationsForFrame(const RenderPassList& rende
rPassesInDrawOrder) OVERRIDE; |
28 virtual bool haveCachedResourcesForRenderPassId(RenderPass::Id) const OVERRI
DE; | 28 virtual bool haveCachedResourcesForRenderPassId(RenderPass::Id) const OVERRI
DE; |
29 virtual void drawFrame(const RenderPassList& renderPassesInDrawOrder, const
RenderPassIdHashMap& renderPassesById) OVERRIDE; | 29 virtual void drawFrame(RenderPassList& renderPassesInDrawOrder, RenderPassId
HashMap& renderPassesById) OVERRIDE; |
30 | 30 |
31 struct CC_EXPORT DrawingFrame { | 31 struct CC_EXPORT DrawingFrame { |
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 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; | 101 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; |
102 ResourceProvider* m_resourceProvider; | 102 ResourceProvider* m_resourceProvider; |
103 | 103 |
104 private: | 104 private: |
105 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 105 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace cc | 108 } // namespace cc |
109 | 109 |
110 #endif // CC_DIRECT_RENDERER_H_ | 110 #endif // CC_DIRECT_RENDERER_H_ |
OLD | NEW |