| 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 26 matching lines...) Expand all Loading... |
| 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 gfx::Transform projectionMatrix; | 42 gfx::Transform projectionMatrix; |
| 43 gfx::Transform windowMatrix; | 43 gfx::Transform windowMatrix; |
| 44 bool flippedY; | 44 bool flippedY; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 void setEnlargePassTextureAmountForTesting(gfx::Vector2d amount); |
| 48 |
| 47 protected: | 49 protected: |
| 48 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); | 50 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); |
| 49 | 51 |
| 50 class CachedResource : public ScopedResource { | 52 class CachedResource : public ScopedResource { |
| 51 public: | 53 public: |
| 52 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { | 54 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi
der) { |
| 53 return make_scoped_ptr(new CachedResource(resourceProvider)); | 55 return make_scoped_ptr(new CachedResource(resourceProvider)); |
| 54 } | 56 } |
| 55 virtual ~CachedResource() {} | 57 virtual ~CachedResource() {} |
| 56 | 58 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual void finishDrawingFrame(DrawingFrame&) = 0; | 97 virtual void finishDrawingFrame(DrawingFrame&) = 0; |
| 96 virtual void finishDrawingQuadList(); | 98 virtual void finishDrawingQuadList(); |
| 97 virtual bool flippedFramebuffer() const = 0; | 99 virtual bool flippedFramebuffer() const = 0; |
| 98 virtual void ensureScissorTestEnabled() = 0; | 100 virtual void ensureScissorTestEnabled() = 0; |
| 99 virtual void ensureScissorTestDisabled() = 0; | 101 virtual void ensureScissorTestDisabled() = 0; |
| 100 | 102 |
| 101 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; | 103 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; |
| 102 ResourceProvider* m_resourceProvider; | 104 ResourceProvider* m_resourceProvider; |
| 103 | 105 |
| 104 private: | 106 private: |
| 107 |
| 108 gfx::Vector2d m_enlargePassTextureAmount; |
| 109 |
| 105 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 110 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 } // namespace cc | 113 } // namespace cc |
| 109 | 114 |
| 110 #endif // CC_DIRECT_RENDERER_H_ | 115 #endif // CC_DIRECT_RENDERER_H_ |
| OLD | NEW |