Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_VULKAN_RENDERER_H_ | 5 #ifndef CC_OUTPUT_VULKAN_RENDERER_H_ |
| 6 #define CC_OUTPUT_VULKAN_RENDERER_H_ | 6 #define CC_OUTPUT_VULKAN_RENDERER_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/output/compositor_frame.h" | |
| 9 #include "cc/output/direct_renderer.h" | 10 #include "cc/output/direct_renderer.h" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 | 13 |
| 13 class TextureMailboxDeleter; | 14 class TextureMailboxDeleter; |
| 14 | 15 |
| 15 class CC_EXPORT VulkanRenderer : public DirectRenderer { | 16 class CC_EXPORT VulkanRenderer : public DirectRenderer { |
| 16 public: | 17 public: |
| 17 VulkanRenderer(const RendererSettings* settings, | 18 VulkanRenderer(const RendererSettings* settings, |
| 18 OutputSurface* output_surface, | 19 OutputSurface* output_surface, |
| 19 ResourceProvider* resource_provider, | 20 ResourceProvider* resource_provider, |
| 20 TextureMailboxDeleter* texture_mailbox_deleter, | 21 TextureMailboxDeleter* texture_mailbox_deleter, |
| 21 int highp_threshold_min); | 22 int highp_threshold_min); |
| 22 ~VulkanRenderer() override; | 23 ~VulkanRenderer() override; |
| 23 | 24 |
| 24 // Implementation of public DirectRenderer functions. | 25 // Implementation of public DirectRenderer functions. |
| 25 void SwapBuffers(const CompositorFrameMetadata& metadata) override; | 26 void SwapBuffers(CompositorFrameMetadata metadata) override; |
|
a.suchit2
2016/10/18 11:59:10
This override function declaration is changed in c
| |
| 26 void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) override; | 27 |
| 27 | 28 |
| 28 protected: | 29 protected: |
| 29 // Implementations of protected Renderer functions. | 30 // Implementations of protected Renderer functions. |
| 30 void DidChangeVisibility() override; | 31 void DidChangeVisibility() override; |
| 31 | 32 |
| 32 // Implementations of protected DirectRenderer functions. | 33 // Implementations of protected DirectRenderer functions. |
| 33 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; | 34 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; |
| 34 bool BindFramebufferToTexture(DrawingFrame* frame, | 35 bool BindFramebufferToTexture(DrawingFrame* frame, |
| 35 const ScopedResource* resource) override; | 36 const ScopedResource* resource) override; |
| 36 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; | 37 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; |
| 37 void PrepareSurfaceForPass(DrawingFrame* frame, | 38 void PrepareSurfaceForPass(DrawingFrame* frame, |
| 38 SurfaceInitializationMode initialization_mode, | 39 SurfaceInitializationMode initialization_mode, |
| 39 const gfx::Rect& render_pass_scissor) override; | 40 const gfx::Rect& render_pass_scissor) override; |
| 40 void DoDrawQuad(DrawingFrame* frame, | 41 void DoDrawQuad(DrawingFrame* frame, |
| 41 const DrawQuad* quad, | 42 const DrawQuad* quad, |
| 42 const gfx::QuadF* clip_region) override; | 43 const gfx::QuadF* clip_region) override; |
| 43 void BeginDrawingFrame(DrawingFrame* frame) override; | 44 void BeginDrawingFrame(DrawingFrame* frame) override; |
| 44 void FinishDrawingFrame(DrawingFrame* frame) override; | 45 void FinishDrawingFrame(DrawingFrame* frame) override; |
| 45 void FinishDrawingQuadList() override; | 46 void FinishDrawingQuadList() override; |
| 46 bool FlippedFramebuffer(const DrawingFrame* frame) const override; | 47 bool FlippedFramebuffer(const DrawingFrame* frame) const override; |
| 47 void EnsureScissorTestEnabled() override; | 48 void EnsureScissorTestEnabled() override; |
| 48 void EnsureScissorTestDisabled() override; | 49 void EnsureScissorTestDisabled() override; |
| 49 void DiscardBackbuffer() override; | |
| 50 void EnsureBackbuffer() override; | |
| 51 void CopyCurrentRenderPassToBitmap( | 50 void CopyCurrentRenderPassToBitmap( |
| 52 DrawingFrame* frame, | 51 DrawingFrame* frame, |
| 53 std::unique_ptr<CopyOutputRequest> request) override; | 52 std::unique_ptr<CopyOutputRequest> request) override; |
| 53 bool CanPartialSwap() override; | |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 DISALLOW_COPY_AND_ASSIGN(VulkanRenderer); | 56 DISALLOW_COPY_AND_ASSIGN(VulkanRenderer); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace cc | 59 } // namespace cc |
| 60 | 60 |
| 61 #endif // CC_OUTPUT_VULKAN_RENDERER_H_ | 61 #endif // CC_OUTPUT_VULKAN_RENDERER_H_ |
| OLD | NEW |