• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2021 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // DisplayVkLinux.cpp:
7 //    Implements the class methods for DisplayVkLinux.
8 //
9 
10 #include "libANGLE/renderer/vulkan/linux/DisplayVkLinux.h"
11 
12 #include "libANGLE/renderer/vulkan/RendererVk.h"
13 #include "libANGLE/renderer/vulkan/linux/DmaBufImageSiblingVkLinux.h"
14 
15 namespace rx
16 {
17 
DisplayVkLinux(const egl::DisplayState & state)18 DisplayVkLinux::DisplayVkLinux(const egl::DisplayState &state) : DisplayVk(state) {}
19 
createExternalImageSibling(const gl::Context * context,EGLenum target,EGLClientBuffer buffer,const egl::AttributeMap & attribs)20 ExternalImageSiblingImpl *DisplayVkLinux::createExternalImageSibling(
21     const gl::Context *context,
22     EGLenum target,
23     EGLClientBuffer buffer,
24     const egl::AttributeMap &attribs)
25 {
26     switch (target)
27     {
28         case EGL_LINUX_DMA_BUF_EXT:
29             ASSERT(context == nullptr);
30             ASSERT(buffer == nullptr);
31             return new DmaBufImageSiblingVkLinux(attribs);
32 
33         default:
34             return DisplayVk::createExternalImageSibling(context, target, buffer, attribs);
35     }
36 }
37 }  // namespace rx
38