Hash :
60ad763d
Author :
Date :
2021-03-01T15:29:51
Vulkan: Enable EGL_ANDROID_recordable for EGL configs on SwiftShader There does not seem to be a way to query the Gralloc and Vulkan drivers for recordable support so keep this as a narrow hack restricted to SwiftShader. Bug: b/181163023 Test: `cts -m CtsMediaTestCases` on Cuttlefish w/ SwANGLE Change-Id: I0bfee01d43ea8e3d9965f5bfaa578a285d37db29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2727874 Commit-Queue: Jason Macnak <natsu@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DisplayVkAndroid.h:
// Defines the class interface for DisplayVkAndroid, implementing DisplayVk for Android.
//
#ifndef LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_
#define LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_
#include "libANGLE/renderer/vulkan/DisplayVk.h"
#include "libANGLE/renderer/vulkan/android/AHBFunctions.h"
namespace rx
{
class DisplayVkAndroid : public DisplayVk
{
public:
DisplayVkAndroid(const egl::DisplayState &state);
egl::Error initialize(egl::Display *display) override;
bool isValidNativeWindow(EGLNativeWindowType window) const override;
SurfaceImpl *createWindowSurfaceVk(const egl::SurfaceState &state,
EGLNativeWindowType window) override;
egl::ConfigSet generateConfigs() override;
void checkConfigSupport(egl::Config *config) override;
egl::Error validateImageClientBuffer(const gl::Context *context,
EGLenum target,
EGLClientBuffer clientBuffer,
const egl::AttributeMap &attribs) const override;
ExternalImageSiblingImpl *createExternalImageSibling(const gl::Context *context,
EGLenum target,
EGLClientBuffer buffer,
const egl::AttributeMap &attribs) override;
const char *getWSIExtension() const override;
const AHBFunctions &getAHBFunctions() const { return mAHBFunctions; }
private:
void enableRecordableIfSupported(egl::Config *config);
AHBFunctions mAHBFunctions;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_