Hash :
78f146e3
Author :
Date :
2024-10-14T00:00:00
Remove EAGL support Fixed: angleproject:362530620 Change-Id: I6157655a7ad5b1e30c5d0a155d3ae3e8a81997e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938872 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.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 56 57 58
//
// Copyright 2020 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.
//
#ifndef LIBANGLE_RENDERER_METAL_IOSURFACESURFACEMTL_H_
#define LIBANGLE_RENDERER_METAL_IOSURFACESURFACEMTL_H_
#include <IOSurface/IOSurfaceRef.h>
#include "libANGLE/renderer/SurfaceImpl.h"
#include "libANGLE/renderer/metal/DisplayMtl.h"
#include "libANGLE/renderer/metal/SurfaceMtl.h"
namespace metal
{
class AttributeMap;
} // namespace metal
namespace rx
{
class DisplayMTL;
// Offscreen created from IOSurface
class IOSurfaceSurfaceMtl : public OffscreenSurfaceMtl
{
public:
IOSurfaceSurfaceMtl(DisplayMtl *display,
const egl::SurfaceState &state,
EGLClientBuffer buffer,
const egl::AttributeMap &attribs);
~IOSurfaceSurfaceMtl() override;
egl::Error bindTexImage(const gl::Context *context,
gl::Texture *texture,
EGLint buffer) override;
egl::Error releaseTexImage(const gl::Context *context, EGLint buffer) override;
angle::Result getAttachmentRenderTarget(const gl::Context *context,
GLenum binding,
const gl::ImageIndex &imageIndex,
GLsizei samples,
FramebufferAttachmentRenderTarget **rtOut) override;
static bool ValidateAttributes(EGLClientBuffer buffer, const egl::AttributeMap &attribs);
private:
angle::Result ensureColorTextureCreated(const gl::Context *context);
IOSurfaceRef mIOSurface;
NSUInteger mIOSurfacePlane;
int mIOSurfaceFormatIdx;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_METAL_IOSURFACESURFACEMTL_H_