| 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(RenderPassList& renderPassesInDrawOrder, RenderPassId
HashMap& renderPassesById) OVERRIDE; | 29 virtual void drawFrame(RenderPassList& renderPassesInDrawOrder) 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; | |
| 36 const RenderPass* rootRenderPass; | 35 const RenderPass* rootRenderPass; |
| 37 const RenderPass* currentRenderPass; | 36 const RenderPass* currentRenderPass; |
| 38 const ScopedResource* currentTexture; | 37 const ScopedResource* currentTexture; |
| 39 | 38 |
| 40 gfx::RectF rootDamageRect; | 39 gfx::RectF rootDamageRect; |
| 41 | 40 |
| 42 gfx::Transform projectionMatrix; | 41 gfx::Transform projectionMatrix; |
| 43 gfx::Transform windowMatrix; | 42 gfx::Transform windowMatrix; |
| 44 bool flippedY; | 43 bool flippedY; |
| 45 }; | 44 }; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 private: | 105 private: |
| 107 | 106 |
| 108 gfx::Vector2d m_enlargePassTextureAmount; | 107 gfx::Vector2d m_enlargePassTextureAmount; |
| 109 | 108 |
| 110 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 109 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 111 }; | 110 }; |
| 112 | 111 |
| 113 } // namespace cc | 112 } // namespace cc |
| 114 | 113 |
| 115 #endif // CC_DIRECT_RENDERER_H_ | 114 #endif // CC_DIRECT_RENDERER_H_ |
| OLD | NEW |