Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 74a66c2

Browse files
committed
fix bug
1 parent a0fac42 commit 74a66c2

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

shell/gpu/gpu_surface_vulkan.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ namespace flutter {
1919

2020
class GPUSurfaceVulkan : public Surface {
2121
public:
22+
//------------------------------------------------------------------------------
23+
/// @brief Create a GPUSurfaceVulkan which implicitly creates its own
24+
/// GrDirectContext for Skia.
25+
///
2226
GPUSurfaceVulkan(GPUSurfaceVulkanDelegate* delegate,
2327
std::unique_ptr<vulkan::VulkanNativeSurface> native_surface,
2428
bool render_to_surface);
2529

30+
//------------------------------------------------------------------------------
31+
/// @brief Create a GPUSurfaceVulkan while letting it reuse an existing
32+
/// GrDirectContext.
33+
///
2634
GPUSurfaceVulkan(const sk_sp<GrDirectContext>& context,
2735
GPUSurfaceVulkanDelegate* delegate,
2836
std::unique_ptr<vulkan::VulkanNativeSurface> native_surface,

vulkan/vulkan_window.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ VulkanWindow::VulkanWindow(fml::RefPtr<VulkanProcTable> proc_table,
2424
: VulkanWindow(nullptr,
2525
proc_table,
2626
std::move(native_surface),
27-
render_to_surface);
27+
render_to_surface) {}
2828

2929
VulkanWindow::VulkanWindow(const sk_sp<GrDirectContext>& context,
3030
fml::RefPtr<VulkanProcTable> proc_table,

vulkan/vulkan_window.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,18 @@ class VulkanBackbuffer;
3131

3232
class VulkanWindow {
3333
public:
34+
//------------------------------------------------------------------------------
35+
/// @brief Construct a VulkanWindow. Let it implicitly create a
36+
/// GrDirectContext.
37+
///
3438
VulkanWindow(fml::RefPtr<VulkanProcTable> proc_table,
3539
std::unique_ptr<VulkanNativeSurface> native_surface,
3640
bool render_to_surface);
3741

42+
//------------------------------------------------------------------------------
43+
/// @brief Construct a VulkanWindow. Let reuse an existing
44+
/// GrDirectContext built by another VulkanWindow.
45+
///
3846
VulkanWindow(const sk_sp<GrDirectContext>& context,
3947
fml::RefPtr<VulkanProcTable> proc_table,
4048
std::unique_ptr<VulkanNativeSurface> native_surface,

0 commit comments

Comments
 (0)