Skip to content

Commit 79faadf

Browse files
i-nazarov-samsungAngle LUCI CQ
authored and
Angle LUCI CQ
committed
Vulkan: Simple WindowSurfaceVk refactoring
Changes: - Update `ImageAcquireState` enumeration. - Make `getCurrentWindowSize()` const. Some implementations are now using local `surfaceCaps` variable instead of `mSurfaceCaps`, however this will not affect reset of the logic. - Remove `extentsOut` parameter from `createSurfaceVk()` and call `getCurrentWindowSize()` explicitly only when needed. - Remove `forceSwapchainRecreate` parameter since it is always has false as an argument. - Remove redundant `impl::` namespace. - Make `queryAndAdjustSurfaceCaps()` const. Bug: angleproject:397848903 Change-Id: I955be15fb4709e137f2ad8a165fd04a3fe626fbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6298732 Reviewed-by: Charlie Lao <[email protected]> Commit-Queue: Igor Nazarov <[email protected]>
1 parent 35ffe55 commit 79faadf

18 files changed

+133
-144
lines changed

src/libANGLE/renderer/vulkan/SurfaceVk.cpp

+72-72
Large diffs are not rendered by default.

src/libANGLE/renderer/vulkan/SurfaceVk.h

+8-10
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ struct SwapchainImage : angle::NonCopyable
204204

205205
enum class ImageAcquireState
206206
{
207-
Ready,
208-
NeedToAcquire,
207+
Unacquired,
209208
NeedToProcessResult,
209+
Ready,
210210
};
211211

212212
// Associated data for a call to vkAcquireNextImageKHR without necessarily holding the share group
@@ -252,7 +252,7 @@ struct UnlockedAcquireResult : angle::NonCopyable
252252
struct ImageAcquireOperation : angle::NonCopyable
253253
{
254254
// Initially image needs to be acquired.
255-
ImageAcquireState state = ImageAcquireState::NeedToAcquire;
255+
ImageAcquireState state = ImageAcquireState::Unacquired;
256256

257257
// No synchronization is necessary when making the vkAcquireNextImageKHR call since it is ONLY
258258
// possible on a thread where Surface is current.
@@ -384,9 +384,9 @@ class WindowSurfaceVk : public SurfaceVk
384384
VkBool32 mSupportsProtectedSwapchain;
385385

386386
private:
387-
virtual angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) = 0;
387+
virtual angle::Result createSurfaceVk(vk::ErrorContext *context) = 0;
388388
virtual angle::Result getCurrentWindowSize(vk::ErrorContext *context,
389-
gl::Extents *extentsOut) = 0;
389+
gl::Extents *extentsOut) const = 0;
390390

391391
vk::PresentMode getDesiredSwapchainPresentMode() const;
392392
void setDesiredSwapchainPresentMode(vk::PresentMode presentMode);
@@ -397,19 +397,17 @@ class WindowSurfaceVk : public SurfaceVk
397397
angle::Result createSwapChain(vk::ErrorContext *context, const gl::Extents &extents);
398398
angle::Result collectOldSwapchain(ContextVk *contextVk, VkSwapchainKHR swapchain);
399399
angle::Result queryAndAdjustSurfaceCaps(ContextVk *contextVk,
400-
VkSurfaceCapabilitiesKHR *surfaceCaps);
400+
VkSurfaceCapabilitiesKHR *surfaceCapsOut) const;
401401
angle::Result checkForOutOfDateSwapchain(ContextVk *contextVk, bool forceRecreate);
402402
angle::Result resizeSwapchainImages(vk::ErrorContext *context, uint32_t imageCount);
403403
void releaseSwapchainImages(ContextVk *contextVk);
404404
void destroySwapChainImages(DisplayVk *displayVk);
405-
angle::Result prepareForAcquireNextSwapchainImage(const gl::Context *context,
406-
bool forceSwapchainRecreate);
405+
angle::Result prepareForAcquireNextSwapchainImage(const gl::Context *context);
407406
// Called when a swapchain image whose acquisition was deferred must be acquired. This method
408407
// will recreate the swapchain (if needed due to present returning OUT_OF_DATE, swap interval
409408
// changing, surface size changing etc, by calling prepareForAcquireNextSwapchainImage()) and
410409
// call the doDeferredAcquireNextImageWithUsableSwapchain() method.
411-
angle::Result doDeferredAcquireNextImage(const gl::Context *context,
412-
bool forceSwapchainRecreate);
410+
angle::Result doDeferredAcquireNextImage(const gl::Context *context);
413411
// Calls acquireNextSwapchainImage() and sets up the acquired image. On some platforms,
414412
// vkAcquireNextImageKHR returns OUT_OF_DATE instead of present, so this function may still
415413
// recreate the swapchain. The main difference with doDeferredAcquireNextImage is that it does

src/libANGLE/renderer/vulkan/android/WindowSurfaceVkAndroid.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ WindowSurfaceVkAndroid::WindowSurfaceVkAndroid(const egl::SurfaceState &surfaceS
2121
: WindowSurfaceVk(surfaceState, window)
2222
{}
2323

24-
angle::Result WindowSurfaceVkAndroid::createSurfaceVk(vk::ErrorContext *context,
25-
gl::Extents *extentsOut)
24+
angle::Result WindowSurfaceVkAndroid::createSurfaceVk(vk::ErrorContext *context)
2625
{
2726
VkAndroidSurfaceCreateInfoKHR createInfo = {};
2827

@@ -32,11 +31,11 @@ angle::Result WindowSurfaceVkAndroid::createSurfaceVk(vk::ErrorContext *context,
3231
ANGLE_VK_TRY(context, vkCreateAndroidSurfaceKHR(context->getRenderer()->getInstance(),
3332
&createInfo, nullptr, &mSurface));
3433

35-
return getCurrentWindowSize(context, extentsOut);
34+
return angle::Result::Continue;
3635
}
3736

3837
angle::Result WindowSurfaceVkAndroid::getCurrentWindowSize(vk::ErrorContext *context,
39-
gl::Extents *extentsOut)
38+
gl::Extents *extentsOut) const
4039
{
4140
vk::Renderer *renderer = context->getRenderer();
4241
const VkPhysicalDevice &physicalDevice = renderer->getPhysicalDevice();

src/libANGLE/renderer/vulkan/android/WindowSurfaceVkAndroid.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class WindowSurfaceVkAndroid : public WindowSurfaceVk
2121
WindowSurfaceVkAndroid(const egl::SurfaceState &surfaceState, EGLNativeWindowType window);
2222

2323
private:
24-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
25-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
24+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
25+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
26+
gl::Extents *extentsOut) const override;
2627
};
2728

2829
} // namespace rx

src/libANGLE/renderer/vulkan/fuchsia/WindowSurfaceVkFuchsia.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ bool WindowSurfaceVkFuchsia::isValidNativeWindow(EGLNativeWindowType window)
3434
return fuchsia_egl_window_get_width(egl_window) >= 0;
3535
}
3636

37-
angle::Result WindowSurfaceVkFuchsia::createSurfaceVk(vk::ErrorContext *context,
38-
gl::Extents *extentsOut)
37+
angle::Result WindowSurfaceVkFuchsia::createSurfaceVk(vk::ErrorContext *context)
3938
{
4039
#if !defined(ANGLE_SHARED_LIBVULKAN)
4140
InitImagePipeSurfaceFUCHSIAFunctions(context->getRenderer()->getInstance());
@@ -48,11 +47,11 @@ angle::Result WindowSurfaceVkFuchsia::createSurfaceVk(vk::ErrorContext *context,
4847
ANGLE_VK_TRY(context, vkCreateImagePipeSurfaceFUCHSIA(context->getRenderer()->getInstance(),
4948
&createInfo, nullptr, &mSurface));
5049

51-
return getCurrentWindowSize(context, extentsOut);
50+
return angle::Result::Continue;
5251
}
5352

5453
angle::Result WindowSurfaceVkFuchsia::getCurrentWindowSize(vk::ErrorContext *context,
55-
gl::Extents *extentsOut)
54+
gl::Extents *extentsOut) const
5655
{
5756
fuchsia_egl_window *egl_window = reinterpret_cast<fuchsia_egl_window *>(mNativeWindowType);
5857

src/libANGLE/renderer/vulkan/fuchsia/WindowSurfaceVkFuchsia.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class WindowSurfaceVkFuchsia : public WindowSurfaceVk
2424
static bool isValidNativeWindow(EGLNativeWindowType window);
2525

2626
private:
27-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
28-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
27+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
28+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
29+
gl::Extents *extentsOut) const override;
2930
};
3031

3132
} // namespace rx

src/libANGLE/renderer/vulkan/linux/display/WindowSurfaceVkSimple.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ WindowSurfaceVkSimple::WindowSurfaceVkSimple(const egl::SurfaceState &surfaceSta
2020

2121
WindowSurfaceVkSimple::~WindowSurfaceVkSimple() {}
2222

23-
angle::Result WindowSurfaceVkSimple::createSurfaceVk(vk::ErrorContext *context,
24-
gl::Extents *extentsOut)
23+
angle::Result WindowSurfaceVkSimple::createSurfaceVk(vk::ErrorContext *context)
2524
{
2625
vk::Renderer *renderer = context->getRenderer();
2726
ASSERT(renderer != nullptr);
@@ -63,20 +62,20 @@ angle::Result WindowSurfaceVkSimple::createSurfaceVk(vk::ErrorContext *context,
6362

6463
ANGLE_VK_TRY(context, vkCreateDisplayPlaneSurfaceKHR(instance, &info, nullptr, &mSurface));
6564

66-
return getCurrentWindowSize(context, extentsOut);
65+
return angle::Result::Continue;
6766
}
6867

6968
angle::Result WindowSurfaceVkSimple::getCurrentWindowSize(vk::ErrorContext *context,
70-
gl::Extents *extentsOut)
69+
gl::Extents *extentsOut) const
7170
{
7271
vk::Renderer *renderer = context->getRenderer();
7372
const VkPhysicalDevice &physicalDevice = renderer->getPhysicalDevice();
7473

75-
ANGLE_VK_TRY(context, vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, mSurface,
76-
&mSurfaceCaps));
74+
VkSurfaceCapabilitiesKHR surfaceCaps;
75+
ANGLE_VK_TRY(context,
76+
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, mSurface, &surfaceCaps));
7777

78-
*extentsOut =
79-
gl::Extents(mSurfaceCaps.currentExtent.width, mSurfaceCaps.currentExtent.height, 1);
78+
*extentsOut = gl::Extents(surfaceCaps.currentExtent.width, surfaceCaps.currentExtent.height, 1);
8079
return angle::Result::Continue;
8180
}
8281

src/libANGLE/renderer/vulkan/linux/display/WindowSurfaceVkSimple.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ class WindowSurfaceVkSimple final : public WindowSurfaceVk
2222
~WindowSurfaceVkSimple() final;
2323

2424
private:
25-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
26-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
25+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
26+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
27+
gl::Extents *extentsOut) const override;
2728
};
2829

2930
} // namespace rx

src/libANGLE/renderer/vulkan/linux/headless/WindowSurfaceVkHeadless.cpp

+4-14
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ WindowSurfaceVkHeadless::WindowSurfaceVkHeadless(const egl::SurfaceState &surfac
2020

2121
WindowSurfaceVkHeadless::~WindowSurfaceVkHeadless() {}
2222

23-
angle::Result WindowSurfaceVkHeadless::createSurfaceVk(vk::ErrorContext *context,
24-
gl::Extents *extentsOut)
23+
angle::Result WindowSurfaceVkHeadless::createSurfaceVk(vk::ErrorContext *context)
2524
{
2625
vk::Renderer *renderer = context->getRenderer();
2726
ASSERT(renderer != nullptr);
@@ -32,16 +31,12 @@ angle::Result WindowSurfaceVkHeadless::createSurfaceVk(vk::ErrorContext *context
3231

3332
ANGLE_VK_TRY(context, vkCreateHeadlessSurfaceEXT(instance, &createInfo, nullptr, &mSurface));
3433

35-
return getCurrentWindowSize(context, extentsOut);
34+
return angle::Result::Continue;
3635
}
3736

3837
angle::Result WindowSurfaceVkHeadless::getCurrentWindowSize(vk::ErrorContext *context,
39-
gl::Extents *extentsOut)
38+
gl::Extents *extentsOut) const
4039
{
41-
const VkPhysicalDevice &physicalDevice = context->getRenderer()->getPhysicalDevice();
42-
ANGLE_VK_TRY(context, vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, mSurface,
43-
&mSurfaceCaps));
44-
4540
// Spec: "For headless surfaces, currentExtent is the reserved value (0xFFFFFFFF, 0xFFFFFFFF).
4641
// Whatever the application sets a swapchain's imageExtent to will be the size of the surface,
4742
// after the first image is presented."
@@ -50,12 +45,7 @@ angle::Result WindowSurfaceVkHeadless::getCurrentWindowSize(vk::ErrorContext *co
5045
angle::vk::SimpleDisplayWindow *simpleWindow =
5146
reinterpret_cast<angle::vk::SimpleDisplayWindow *>(mNativeWindowType);
5247

53-
// Update surface extent before output the new extent.
54-
mSurfaceCaps.currentExtent.width = simpleWindow->width;
55-
mSurfaceCaps.currentExtent.height = simpleWindow->height;
56-
57-
*extentsOut =
58-
gl::Extents(mSurfaceCaps.currentExtent.width, mSurfaceCaps.currentExtent.height, 1);
48+
*extentsOut = gl::Extents(simpleWindow->width, simpleWindow->height, 1);
5949

6050
return angle::Result::Continue;
6151
}

src/libANGLE/renderer/vulkan/linux/headless/WindowSurfaceVkHeadless.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ class WindowSurfaceVkHeadless final : public WindowSurfaceVk
2222
~WindowSurfaceVkHeadless() final;
2323

2424
private:
25-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
26-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
25+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
26+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
27+
gl::Extents *extentsOut) const override;
2728
};
2829

2930
} // namespace rx

src/libANGLE/renderer/vulkan/linux/wayland/WindowSurfaceVkWayland.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ WindowSurfaceVkWayland::WindowSurfaceVkWayland(const egl::SurfaceState &surfaceS
3636
mExtents = gl::Extents(eglWindow->width, eglWindow->height, 1);
3737
}
3838

39-
angle::Result WindowSurfaceVkWayland::createSurfaceVk(vk::ErrorContext *context,
40-
gl::Extents *extentsOut)
39+
angle::Result WindowSurfaceVkWayland::createSurfaceVk(vk::ErrorContext *context)
4140
{
4241
ANGLE_VK_CHECK(context,
4342
vkGetPhysicalDeviceWaylandPresentationSupportKHR(
@@ -56,11 +55,11 @@ angle::Result WindowSurfaceVkWayland::createSurfaceVk(vk::ErrorContext *context,
5655
ANGLE_VK_TRY(context, vkCreateWaylandSurfaceKHR(context->getRenderer()->getInstance(),
5756
&createInfo, nullptr, &mSurface));
5857

59-
return getCurrentWindowSize(context, extentsOut);
58+
return angle::Result::Continue;
6059
}
6160

6261
angle::Result WindowSurfaceVkWayland::getCurrentWindowSize(vk::ErrorContext *context,
63-
gl::Extents *extentsOut)
62+
gl::Extents *extentsOut) const
6463
{
6564
*extentsOut = mExtents;
6665
return angle::Result::Continue;

src/libANGLE/renderer/vulkan/linux/wayland/WindowSurfaceVkWayland.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ class WindowSurfaceVkWayland : public WindowSurfaceVk
3636
egl::Error getUserHeight(const egl::Display *display, EGLint *value) const override;
3737

3838
private:
39-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
40-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
39+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
40+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
41+
gl::Extents *extentsOut) const override;
4142

4243
wl_display *mWaylandDisplay;
4344
gl::Extents mExtents;

src/libANGLE/renderer/vulkan/linux/xcb/WindowSurfaceVkXcb.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ WindowSurfaceVkXcb::WindowSurfaceVkXcb(const egl::SurfaceState &surfaceState,
2020
: WindowSurfaceVk(surfaceState, window), mXcbConnection(conn)
2121
{}
2222

23-
angle::Result WindowSurfaceVkXcb::createSurfaceVk(vk::ErrorContext *context,
24-
gl::Extents *extentsOut)
23+
angle::Result WindowSurfaceVkXcb::createSurfaceVk(vk::ErrorContext *context)
2524
{
2625
VkXcbSurfaceCreateInfoKHR createInfo = {};
2726

@@ -32,11 +31,11 @@ angle::Result WindowSurfaceVkXcb::createSurfaceVk(vk::ErrorContext *context,
3231
ANGLE_VK_TRY(context, vkCreateXcbSurfaceKHR(context->getRenderer()->getInstance(), &createInfo,
3332
nullptr, &mSurface));
3433

35-
return getCurrentWindowSize(context, extentsOut);
34+
return angle::Result::Continue;
3635
}
3736

3837
angle::Result WindowSurfaceVkXcb::getCurrentWindowSize(vk::ErrorContext *context,
39-
gl::Extents *extentsOut)
38+
gl::Extents *extentsOut) const
4039
{
4140
xcb_get_geometry_cookie_t cookie =
4241
xcb_get_geometry(mXcbConnection, static_cast<xcb_drawable_t>(mNativeWindowType));

src/libANGLE/renderer/vulkan/linux/xcb/WindowSurfaceVkXcb.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class WindowSurfaceVkXcb : public WindowSurfaceVk
2525
xcb_connection_t *conn);
2626

2727
private:
28-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
29-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
28+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
29+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
30+
gl::Extents *extentsOut) const override;
3031

3132
xcb_connection_t *mXcbConnection;
3233
};

src/libANGLE/renderer/vulkan/mac/WindowSurfaceVkMac.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class WindowSurfaceVkMac : public WindowSurfaceVk
2424
~WindowSurfaceVkMac() override;
2525

2626
private:
27-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
28-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
27+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
28+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
29+
gl::Extents *extentsOut) const override;
2930

3031
CAMetalLayer *mMetalLayer;
3132
id<MTLDevice> mMetalDevice;

src/libANGLE/renderer/vulkan/mac/WindowSurfaceVkMac.mm

+3-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
[mMetalLayer release];
3030
}
3131

32-
angle::Result WindowSurfaceVkMac::createSurfaceVk(vk::ErrorContext *context,
33-
gl::Extents *extentsOut)
32+
angle::Result WindowSurfaceVkMac::createSurfaceVk(vk::ErrorContext *context)
3433
API_AVAILABLE(macosx(10.11))
3534
{
3635
mMetalDevice = MTLCreateSystemDefaultDevice();
@@ -57,11 +56,11 @@
5756
ANGLE_VK_TRY(context, vkCreateMetalSurfaceEXT(context->getRenderer()->getInstance(),
5857
&createInfo, nullptr, &mSurface));
5958

60-
return getCurrentWindowSize(context, extentsOut);
59+
return angle::Result::Continue;
6160
}
6261

6362
angle::Result WindowSurfaceVkMac::getCurrentWindowSize(vk::ErrorContext *context,
64-
gl::Extents *extentsOut)
63+
gl::Extents *extentsOut) const
6564
API_AVAILABLE(macosx(10.11))
6665
{
6766
ANGLE_VK_CHECK(context, (mMetalLayer != nullptr), VK_ERROR_INITIALIZATION_FAILED);

src/libANGLE/renderer/vulkan/win32/WindowSurfaceVkWin32.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ WindowSurfaceVkWin32::WindowSurfaceVkWin32(const egl::SurfaceState &surfaceState
1919
: WindowSurfaceVk(surfaceState, window)
2020
{}
2121

22-
angle::Result WindowSurfaceVkWin32::createSurfaceVk(vk::ErrorContext *context,
23-
gl::Extents *extentsOut)
22+
angle::Result WindowSurfaceVkWin32::createSurfaceVk(vk::ErrorContext *context)
2423
{
2524
VkWin32SurfaceCreateInfoKHR createInfo = {};
2625

@@ -31,11 +30,11 @@ angle::Result WindowSurfaceVkWin32::createSurfaceVk(vk::ErrorContext *context,
3130
ANGLE_VK_TRY(context, vkCreateWin32SurfaceKHR(context->getRenderer()->getInstance(),
3231
&createInfo, nullptr, &mSurface));
3332

34-
return getCurrentWindowSize(context, extentsOut);
33+
return angle::Result::Continue;
3534
}
3635

3736
angle::Result WindowSurfaceVkWin32::getCurrentWindowSize(vk::ErrorContext *context,
38-
gl::Extents *extentsOut)
37+
gl::Extents *extentsOut) const
3938
{
4039
RECT rect;
4140
ANGLE_VK_CHECK(context, GetClientRect(mNativeWindowType, &rect) == TRUE,

src/libANGLE/renderer/vulkan/win32/WindowSurfaceVkWin32.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class WindowSurfaceVkWin32 : public WindowSurfaceVk
2121
WindowSurfaceVkWin32(const egl::SurfaceState &surfaceState, EGLNativeWindowType window);
2222

2323
private:
24-
angle::Result createSurfaceVk(vk::ErrorContext *context, gl::Extents *extentsOut) override;
25-
angle::Result getCurrentWindowSize(vk::ErrorContext *context, gl::Extents *extentsOut) override;
24+
angle::Result createSurfaceVk(vk::ErrorContext *context) override;
25+
angle::Result getCurrentWindowSize(vk::ErrorContext *context,
26+
gl::Extents *extentsOut) const override;
2627
};
2728

2829
} // namespace rx

0 commit comments

Comments
 (0)