| 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_SOFTWARE_RENDERER_H_ | 5 #ifndef CC_OUTPUT_SOFTWARE_RENDERER_H_ |
| 6 #define CC_OUTPUT_SOFTWARE_RENDERER_H_ | 6 #define CC_OUTPUT_SOFTWARE_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 size_t bytes_visible_and_nearby, | 43 size_t bytes_visible_and_nearby, |
| 44 size_t bytes_allocated) OVERRIDE {} | 44 size_t bytes_allocated) OVERRIDE {} |
| 45 virtual void ReceiveCompositorFrameAck( | 45 virtual void ReceiveCompositorFrameAck( |
| 46 const CompositorFrameAck& ack) OVERRIDE; | 46 const CompositorFrameAck& ack) OVERRIDE; |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; | 49 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; |
| 50 virtual bool BindFramebufferToTexture( | 50 virtual bool BindFramebufferToTexture( |
| 51 DrawingFrame* frame, | 51 DrawingFrame* frame, |
| 52 const ScopedResource* texture, | 52 const ScopedResource* texture, |
| 53 gfx::Rect framebuffer_rect) OVERRIDE; | 53 gfx::Rect target_rect) OVERRIDE; |
| 54 virtual void SetDrawViewportSize(gfx::Size viewport_size) OVERRIDE; | 54 virtual void SetDrawViewport(gfx::Rect viewport) OVERRIDE; |
| 55 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE; | 55 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE; |
| 56 virtual void ClearFramebuffer(DrawingFrame* frame) OVERRIDE; | 56 virtual void ClearFramebuffer(DrawingFrame* frame) OVERRIDE; |
| 57 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) OVERRIDE; | 57 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) OVERRIDE; |
| 58 virtual void BeginDrawingFrame(DrawingFrame* frame) OVERRIDE; | 58 virtual void BeginDrawingFrame(DrawingFrame* frame) OVERRIDE; |
| 59 virtual void FinishDrawingFrame(DrawingFrame* frame) OVERRIDE; | 59 virtual void FinishDrawingFrame(DrawingFrame* frame) OVERRIDE; |
| 60 virtual bool FlippedFramebuffer() const OVERRIDE; | 60 virtual bool FlippedFramebuffer() const OVERRIDE; |
| 61 virtual void EnsureScissorTestEnabled() OVERRIDE; | 61 virtual void EnsureScissorTestEnabled() OVERRIDE; |
| 62 virtual void EnsureScissorTestDisabled() OVERRIDE; | 62 virtual void EnsureScissorTestDisabled() OVERRIDE; |
| 63 virtual void CopyCurrentRenderPassToBitmap( | 63 virtual void CopyCurrentRenderPassToBitmap( |
| 64 DrawingFrame* frame, | 64 DrawingFrame* frame, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 88 const RenderPassDrawQuad* quad); | 88 const RenderPassDrawQuad* quad); |
| 89 void DrawUnsupportedQuad(const DrawingFrame* frame, | 89 void DrawUnsupportedQuad(const DrawingFrame* frame, |
| 90 const DrawQuad* quad); | 90 const DrawQuad* quad); |
| 91 | 91 |
| 92 RendererCapabilities capabilities_; | 92 RendererCapabilities capabilities_; |
| 93 bool visible_; | 93 bool visible_; |
| 94 bool is_scissor_enabled_; | 94 bool is_scissor_enabled_; |
| 95 bool is_viewport_changed_; | 95 bool is_viewport_changed_; |
| 96 gfx::Rect scissor_rect_; | 96 gfx::Rect scissor_rect_; |
| 97 | 97 |
| 98 OutputSurface* output_surface_; | |
| 99 SoftwareOutputDevice* output_device_; | 98 SoftwareOutputDevice* output_device_; |
| 100 SkCanvas* root_canvas_; | 99 SkCanvas* root_canvas_; |
| 101 SkCanvas* current_canvas_; | 100 SkCanvas* current_canvas_; |
| 102 SkPaint current_paint_; | 101 SkPaint current_paint_; |
| 103 scoped_ptr<ResourceProvider::ScopedWriteLockSoftware> | 102 scoped_ptr<ResourceProvider::ScopedWriteLockSoftware> |
| 104 current_framebuffer_lock_; | 103 current_framebuffer_lock_; |
| 105 CompositorFrame compositor_frame_; | 104 CompositorFrame compositor_frame_; |
| 106 | 105 |
| 107 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); | 106 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 } // namespace cc | 109 } // namespace cc |
| 111 | 110 |
| 112 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_ | 111 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_ |
| OLD | NEW |