| 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_OUTPUT_DIRECT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_ |
| 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ | 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" |
| 9 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 10 #include "cc/output/renderer.h" | 11 #include "cc/output/renderer.h" |
| 11 #include "cc/resources/resource_provider.h" | 12 #include "cc/resources/resource_provider.h" |
| 12 #include "cc/resources/scoped_resource.h" | 13 #include "cc/resources/scoped_resource.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 | 16 |
| 16 class ResourceProvider; | 17 class ResourceProvider; |
| 17 | 18 |
| 18 // This is the base class for code shared between the GL and software | 19 // This is the base class for code shared between the GL and software |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual void SetDrawViewportSize(gfx::Size viewport_size) = 0; | 103 virtual void SetDrawViewportSize(gfx::Size viewport_size) = 0; |
| 103 virtual void SetScissorTestRect(gfx::Rect scissor_rect) = 0; | 104 virtual void SetScissorTestRect(gfx::Rect scissor_rect) = 0; |
| 104 virtual void ClearFramebuffer(DrawingFrame* frame) = 0; | 105 virtual void ClearFramebuffer(DrawingFrame* frame) = 0; |
| 105 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) = 0; | 106 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) = 0; |
| 106 virtual void BeginDrawingFrame(DrawingFrame* frame) = 0; | 107 virtual void BeginDrawingFrame(DrawingFrame* frame) = 0; |
| 107 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0; | 108 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0; |
| 108 virtual void FinishDrawingQuadList(); | 109 virtual void FinishDrawingQuadList(); |
| 109 virtual bool FlippedFramebuffer() const = 0; | 110 virtual bool FlippedFramebuffer() const = 0; |
| 110 virtual void EnsureScissorTestEnabled() = 0; | 111 virtual void EnsureScissorTestEnabled() = 0; |
| 111 virtual void EnsureScissorTestDisabled() = 0; | 112 virtual void EnsureScissorTestDisabled() = 0; |
| 112 virtual void CopyCurrentRenderPassToBitmap(DrawingFrame* frame, | 113 |
| 113 SkBitmap* bitmap) = 0; | 114 typedef base::Callback<void(scoped_ptr<SkBitmap>)> |
| 115 CopyRenderPassCallback; |
| 116 virtual void CopyCurrentRenderPassToBitmap( |
| 117 DrawingFrame* frame, |
| 118 const CopyRenderPassCallback& callback) = 0; |
| 114 | 119 |
| 115 ScopedPtrHashMap<RenderPass::Id, CachedResource> render_pass_textures_; | 120 ScopedPtrHashMap<RenderPass::Id, CachedResource> render_pass_textures_; |
| 116 ResourceProvider* resource_provider_; | 121 ResourceProvider* resource_provider_; |
| 117 | 122 |
| 118 private: | 123 private: |
| 119 gfx::Vector2d enlarge_pass_texture_amount_; | 124 gfx::Vector2d enlarge_pass_texture_amount_; |
| 120 | 125 |
| 121 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 126 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 122 }; | 127 }; |
| 123 | 128 |
| 124 } // namespace cc | 129 } // namespace cc |
| 125 | 130 |
| 126 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 131 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |