Hash :
8403e4c5
Author :
Date :
2022-10-10T20:59:29
EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml.
//
// 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.
//
// egl_ext_stubs_autogen.h: Stubs for EXT extension entry points.
#ifndef LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_
#define LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "common/PackedEGLEnums_autogen.h"
#include "common/PackedEnums.h"
namespace gl
{
class Context;
} // namespace gl
namespace egl
{
class AttributeMap;
class Device;
class Display;
class Image;
class Stream;
class Surface;
class Sync;
class Thread;
struct Config;
EGLint ClientWaitSyncKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Sync *syncPacked,
EGLint flags,
EGLTimeKHR timeout);
EGLImageKHR CreateImageKHR(Thread *thread,
egl::Display *dpyPacked,
gl::ContextID ctxPacked,
EGLenum target,
EGLClientBuffer buffer,
const AttributeMap &attrib_listPacked);
EGLClientBuffer CreateNativeClientBufferANDROID(Thread *thread,
const AttributeMap &attrib_listPacked);
EGLSurface CreatePlatformPixmapSurfaceEXT(Thread *thread,
egl::Display *dpyPacked,
egl::Config *configPacked,
void *native_pixmap,
const AttributeMap &attrib_listPacked);
EGLSurface CreatePlatformWindowSurfaceEXT(Thread *thread,
egl::Display *dpyPacked,
egl::Config *configPacked,
void *native_window,
const AttributeMap &attrib_listPacked);
EGLStreamKHR CreateStreamKHR(Thread *thread,
egl::Display *dpyPacked,
const AttributeMap &attrib_listPacked);
EGLSyncKHR CreateSyncKHR(Thread *thread,
egl::Display *dpyPacked,
EGLenum type,
const AttributeMap &attrib_listPacked);
EGLint DebugMessageControlKHR(Thread *thread,
EGLDEBUGPROCKHR callback,
const AttributeMap &attrib_listPacked);
EGLBoolean DestroyImageKHR(Thread *thread, egl::Display *dpyPacked, ImageID imagePacked);
EGLBoolean DestroyStreamKHR(Thread *thread, egl::Display *dpyPacked, egl::Stream *streamPacked);
EGLBoolean DestroySyncKHR(Thread *thread, egl::Display *dpyPacked, egl::Sync *syncPacked);
EGLint DupNativeFenceFDANDROID(Thread *thread, egl::Display *dpyPacked, egl::Sync *syncPacked);
EGLBoolean GetMscRateANGLE(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint *numerator,
EGLint *denominator);
EGLClientBuffer GetNativeClientBufferANDROID(Thread *thread, const struct AHardwareBuffer *buffer);
EGLDisplay GetPlatformDisplayEXT(Thread *thread,
EGLenum platform,
void *native_display,
const AttributeMap &attrib_listPacked);
EGLBoolean GetSyncAttribKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Sync *syncPacked,
EGLint attribute,
EGLint *value);
EGLint LabelObjectKHR(Thread *thread,
egl::Display *displayPacked,
ObjectType objectTypePacked,
EGLObjectKHR object,
EGLLabelKHR label);
EGLBoolean LockSurfaceKHR(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
const AttributeMap &attrib_listPacked);
EGLBoolean PostSubBufferNV(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint x,
EGLint y,
EGLint width,
EGLint height);
EGLBoolean PresentationTimeANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLnsecsANDROID time);
EGLBoolean GetCompositorTimingSupportedANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
CompositorTiming namePacked);
EGLBoolean GetCompositorTimingANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint numTimestamps,
const EGLint *names,
EGLnsecsANDROID *values);
EGLBoolean GetNextFrameIdANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLuint64KHR *frameId);
EGLBoolean GetFrameTimestampSupportedANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
Timestamp timestampPacked);
EGLBoolean GetFrameTimestampsANDROID(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values);
EGLBoolean QueryDebugKHR(Thread *thread, EGLint attribute, EGLAttrib *value);
EGLBoolean QueryDeviceAttribEXT(Thread *thread,
egl::Device *devicePacked,
EGLint attribute,
EGLAttrib *value);
const char *QueryDeviceStringEXT(Thread *thread, egl::Device *devicePacked, EGLint name);
EGLBoolean QueryDisplayAttribEXT(Thread *thread,
egl::Display *dpyPacked,
EGLint attribute,
EGLAttrib *value);
EGLBoolean QueryDmaBufFormatsEXT(Thread *thread,
egl::Display *dpyPacked,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats);
EGLBoolean QueryDmaBufModifiersEXT(Thread *thread,
egl::Display *dpyPacked,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_modifiers);
EGLBoolean QueryStreamKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
EGLenum attribute,
EGLint *value);
EGLBoolean QueryStreamu64KHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
EGLenum attribute,
EGLuint64KHR *value);
EGLBoolean QuerySurface64KHR(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint attribute,
EGLAttribKHR *value);
EGLBoolean QuerySurfacePointerANGLE(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint attribute,
void **value);
void SetBlobCacheFuncsANDROID(Thread *thread,
egl::Display *dpyPacked,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get);
EGLBoolean SetDamageRegionKHR(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLint *rects,
EGLint n_rects);
EGLBoolean SignalSyncKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Sync *syncPacked,
EGLenum mode);
EGLBoolean StreamAttribKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
EGLenum attribute,
EGLint value);
EGLBoolean StreamConsumerAcquireKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked);
EGLBoolean StreamConsumerGLTextureExternalKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked);
EGLBoolean StreamConsumerGLTextureExternalAttribsNV(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
const AttributeMap &attrib_listPacked);
EGLBoolean StreamConsumerReleaseKHR(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked);
EGLBoolean SwapBuffersWithDamageKHR(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
const EGLint *rects,
EGLint n_rects);
EGLBoolean UnlockSurfaceKHR(Thread *thread, egl::Display *dpyPacked, SurfaceID surfacePacked);
EGLint WaitSyncKHR(Thread *thread, egl::Display *dpyPacked, egl::Sync *syncPacked, EGLint flags);
EGLDeviceEXT CreateDeviceANGLE(Thread *thread,
EGLint device_type,
void *native_device,
const EGLAttrib *attrib_list);
EGLBoolean ReleaseDeviceANGLE(Thread *thread, egl::Device *devicePacked);
EGLBoolean CreateStreamProducerD3DTextureANGLE(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
const AttributeMap &attrib_listPacked);
EGLBoolean StreamPostD3DTextureANGLE(Thread *thread,
egl::Display *dpyPacked,
egl::Stream *streamPacked,
void *texture,
const AttributeMap &attrib_listPacked);
EGLBoolean GetSyncValuesCHROMIUM(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLuint64KHR *ust,
EGLuint64KHR *msc,
EGLuint64KHR *sbc);
EGLint ProgramCacheGetAttribANGLE(Thread *thread, egl::Display *dpyPacked, EGLenum attrib);
void ProgramCacheQueryANGLE(Thread *thread,
egl::Display *dpyPacked,
EGLint index,
void *key,
EGLint *keysize,
void *binary,
EGLint *binarysize);
void ProgramCachePopulateANGLE(Thread *thread,
egl::Display *dpyPacked,
const void *key,
EGLint keysize,
const void *binary,
EGLint binarysize);
EGLint ProgramCacheResizeANGLE(Thread *thread, egl::Display *dpyPacked, EGLint limit, EGLint mode);
const char *QueryStringiANGLE(Thread *thread, egl::Display *dpyPacked, EGLint name, EGLint index);
EGLBoolean SwapBuffersWithFrameTokenANGLE(Thread *thread,
egl::Display *dpyPacked,
SurfaceID surfacePacked,
EGLFrameTokenANGLE frametoken);
EGLBoolean PrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface);
void ReleaseHighPowerGPUANGLE(Thread *thread, egl::Display *dpyPacked, gl::ContextID ctxPacked);
void ReacquireHighPowerGPUANGLE(Thread *thread, egl::Display *dpyPacked, gl::ContextID ctxPacked);
void HandleGPUSwitchANGLE(Thread *thread, egl::Display *dpyPacked);
void ForceGPUSwitchANGLE(Thread *thread,
egl::Display *dpyPacked,
EGLint gpuIDHigh,
EGLint gpuIDLow);
EGLBoolean QueryDisplayAttribANGLE(Thread *thread,
egl::Display *dpyPacked,
EGLint attribute,
EGLAttrib *value);
EGLBoolean ExportVkImageANGLE(Thread *thread,
egl::Display *dpyPacked,
ImageID imagePacked,
void *vk_image,
void *vk_image_create_info);
void *CopyMetalSharedEventANGLE(Thread *thread, egl::Display *dpyPacked, egl::Sync *syncPacked);
} // namespace egl
#endif // LIBGLESV2_EGL_EXT_STUBS_AUTOGEN_H_