Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: cc/output/vulkan_renderer.h

Issue 2034583002: Initialize the Display's renderer when the Display is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@displaytest
Patch Set: displayinit: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/output/vulkan_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/direct_renderer.h" 9 #include "cc/output/direct_renderer.h"
10 #include "cc/output/renderer.h" 10 #include "cc/output/renderer.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class TextureMailboxDeleter; 14 class TextureMailboxDeleter;
15 15
16 class CC_EXPORT VulkanRenderer : public DirectRenderer { 16 class CC_EXPORT VulkanRenderer : public DirectRenderer {
17 public: 17 public:
18 static std::unique_ptr<VulkanRenderer> Create( 18 VulkanRenderer(RendererClient* client,
19 RendererClient* client, 19 const RendererSettings* settings,
20 const RendererSettings* settings, 20 OutputSurface* output_surface,
21 OutputSurface* output_surface, 21 ResourceProvider* resource_provider,
22 ResourceProvider* resource_provider, 22 TextureMailboxDeleter* texture_mailbox_deleter,
23 TextureMailboxDeleter* texture_mailbox_deleter, 23 int highp_threshold_min);
24 int highp_threshold_min);
25
26 ~VulkanRenderer() override; 24 ~VulkanRenderer() override;
27 25
28 // Implementation of public Renderer functions. 26 // Implementation of public Renderer functions.
29 const RendererCapabilitiesImpl& Capabilities() const override; 27 const RendererCapabilitiesImpl& Capabilities() const override;
30 void Finish() override; 28 void Finish() override;
31 void SwapBuffers(const CompositorFrameMetadata& metadata) override; 29 void SwapBuffers(const CompositorFrameMetadata& metadata) override;
32 void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) override; 30 void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) override;
33 31
34 protected: 32 protected:
35 VulkanRenderer(RendererClient* client,
36 const RendererSettings* settings,
37 OutputSurface* output_surface,
38 ResourceProvider* resource_provider,
39 TextureMailboxDeleter* texture_mailbox_deleter,
40 int highp_threshold_min);
41
42 // Implementations of protected Renderer functions. 33 // Implementations of protected Renderer functions.
43 void DidChangeVisibility() override; 34 void DidChangeVisibility() override;
44 35
45 // Implementations of protected DirectRenderer functions. 36 // Implementations of protected DirectRenderer functions.
46 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; 37 void BindFramebufferToOutputSurface(DrawingFrame* frame) override;
47 bool BindFramebufferToTexture(DrawingFrame* frame, 38 bool BindFramebufferToTexture(DrawingFrame* frame,
48 const ScopedResource* resource) override; 39 const ScopedResource* resource) override;
49 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; 40 void SetScissorTestRect(const gfx::Rect& scissor_rect) override;
50 void PrepareSurfaceForPass(DrawingFrame* frame, 41 void PrepareSurfaceForPass(DrawingFrame* frame,
51 SurfaceInitializationMode initialization_mode, 42 SurfaceInitializationMode initialization_mode,
(...skipping 15 matching lines...) Expand all
67 58
68 private: 59 private:
69 RendererCapabilitiesImpl capabilities_; 60 RendererCapabilitiesImpl capabilities_;
70 61
71 DISALLOW_COPY_AND_ASSIGN(VulkanRenderer); 62 DISALLOW_COPY_AND_ASSIGN(VulkanRenderer);
72 }; 63 };
73 64
74 } // namespace cc 65 } // namespace cc
75 66
76 #endif // CC_OUTPUT_VULKAN_RENDERER_H_ 67 #endif // CC_OUTPUT_VULKAN_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/output/vulkan_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698