Commit 39a790e8 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Fix viz_unittests to build with Vulkan enabled

viz_unittests currently do not build with Vulkan enabled.
One of the unit tests is GL related and can probably just have a
NOTREACHED().
The other unit test might benefit from a proper Vulkan code path. But
the immediate goal is to just get Vulkan enabled by default quickly. We
can later circle back and add a proper Vulkan code path to the overlay
test if it would be correct.

BUG=852531

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I02a5bd1224575b452e92e3c147ab0c8d0efef76b
Reviewed-on: https://chromium-review.googlesource.com/1099755Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567014}
parent 510d2c6c
......@@ -1933,6 +1933,12 @@ class MockOutputSurface : public OutputSurface {
MOCK_METHOD0(GetFramebufferCopyTextureFormat, GLenum());
MOCK_METHOD1(SwapBuffers_, void(OutputSurfaceFrame& frame)); // NOLINT
void SwapBuffers(OutputSurfaceFrame frame) override { SwapBuffers_(frame); }
#if BUILDFLAG(ENABLE_VULKAN)
gpu::VulkanSurface* GetVulkanSurface() override {
NOTREACHED();
return nullptr;
}
#endif
MOCK_CONST_METHOD0(GetOverlayCandidateValidator,
OverlayCandidateValidator*());
MOCK_CONST_METHOD0(IsDisplayedAsOverlayPlane, bool());
......
......@@ -204,6 +204,12 @@ class OverlayOutputSurface : public OutputSurface {
bool has_alpha,
bool use_stencil) override {}
void SwapBuffers(OutputSurfaceFrame frame) override {}
#if BUILDFLAG(ENABLE_VULKAN)
gpu::VulkanSurface* GetVulkanSurface() override {
NOTREACHED();
return nullptr;
}
#endif
uint32_t GetFramebufferCopyTextureFormat() override {
// TestContextProvider has no real framebuffer, just use RGB.
return GL_RGB;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment