| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/output/compositor_frame.h" | |
| 11 #include "cc/output/direct_renderer.h" | 10 #include "cc/output/direct_renderer.h" |
| 11 #include "ui/events/latency_info.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class DebugBorderDrawQuad; | 14 class DebugBorderDrawQuad; |
| 15 class OutputSurface; | 15 class OutputSurface; |
| 16 class PictureDrawQuad; | 16 class PictureDrawQuad; |
| 17 class RenderPassDrawQuad; | 17 class RenderPassDrawQuad; |
| 18 class ResourceProvider; | 18 class ResourceProvider; |
| 19 class SoftwareOutputDevice; | 19 class SoftwareOutputDevice; |
| 20 class SolidColorDrawQuad; | 20 class SolidColorDrawQuad; |
| 21 class TextureDrawQuad; | 21 class TextureDrawQuad; |
| 22 class TileDrawQuad; | 22 class TileDrawQuad; |
| 23 | 23 |
| 24 class CC_EXPORT SoftwareRenderer : public DirectRenderer { | 24 class CC_EXPORT SoftwareRenderer : public DirectRenderer { |
| 25 public: | 25 public: |
| 26 SoftwareRenderer(const RendererSettings* settings, | 26 SoftwareRenderer(const RendererSettings* settings, |
| 27 OutputSurface* output_surface, | 27 OutputSurface* output_surface, |
| 28 ResourceProvider* resource_provider); | 28 ResourceProvider* resource_provider); |
| 29 | 29 |
| 30 ~SoftwareRenderer() override; | 30 ~SoftwareRenderer() override; |
| 31 | 31 |
| 32 void SwapBuffers(CompositorFrameMetadata metadata) override; | 32 void SwapBuffers(std::vector<ui::LatencyInfo> latency_info) override; |
| 33 | 33 |
| 34 void SetDisablePictureQuadImageFiltering(bool disable) { | 34 void SetDisablePictureQuadImageFiltering(bool disable) { |
| 35 disable_picture_quad_image_filtering_ = disable; | 35 disable_picture_quad_image_filtering_ = disable; |
| 36 } | 36 } |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 bool CanPartialSwap() override; | 39 bool CanPartialSwap() override; |
| 40 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; | 40 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; |
| 41 bool BindFramebufferToTexture(DrawingFrame* frame, | 41 bool BindFramebufferToTexture(DrawingFrame* frame, |
| 42 const ScopedResource* texture) override; | 42 const ScopedResource* texture) override; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 std::unique_ptr<ResourceProvider::ScopedWriteLockSoftware> | 104 std::unique_ptr<ResourceProvider::ScopedWriteLockSoftware> |
| 105 current_framebuffer_lock_; | 105 current_framebuffer_lock_; |
| 106 sk_sp<SkCanvas> current_framebuffer_canvas_; | 106 sk_sp<SkCanvas> current_framebuffer_canvas_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); | 108 DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace cc | 111 } // namespace cc |
| 112 | 112 |
| 113 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_ | 113 #endif // CC_OUTPUT_SOFTWARE_RENDERER_H_ |
| OLD | NEW |