#ifndef LIBANGLE_FRAME_CAPTURE_H_
#define LIBANGLE_FRAME_CAPTURE_H_
#include "common/PackedEnums.h"
#include "common/SimpleMutex.h"
#include "common/frame_capture_utils.h"
#include "common/system_utils.h"
#include "libANGLE/Context.h"
#include "libANGLE/ShareGroup.h"
#include "libANGLE/Thread.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/entry_points_utils.h"
namespace gl
{
enum class BigGLEnum;
enum class GLESEnum;
}
namespace angle
{
class DataCounters final : angle::NonCopyable
{ … };
constexpr int kStringsNotFound = …;
class StringCounters final : angle::NonCopyable
{ … };
class DataTracker final : angle::NonCopyable
{ … };
class ReplayWriter final : angle::NonCopyable
{ … };
BufferCalls;
BufferMapStatusMap;
FenceSyncSet;
FenceSyncCalls;
DefaultUniformLocationsSet;
DefaultUniformLocationsPerProgramMap;
DefaultUniformCallsPerLocationMap;
DefaultUniformCallsPerProgramMap;
DefaultUniformBaseLocationMap;
ResourceSet;
ResourceCalls;
class TrackedResource final : angle::NonCopyable
{ … };
TrackedResourceArray;
enum class ShaderProgramType
{ … };
class ResourceTracker final : angle::NonCopyable
{ … };
HasResourceTypeMap;
ResourceIDToSetupCallsMap;
BufferDataMap;
ProgramSources;
ShaderSourceMap;
ProgramSourceMap;
TextureLevels;
TextureLevelDataMap;
struct SurfaceParams
{ … };
SurfaceParamsMap;
CallVector;
CallResetMap;
TextureBinding;
TextureResetMap;
BufferBindingPair;
class StateResetHelper final : angle::NonCopyable
{ … };
class FrameCapture final : angle::NonCopyable
{ … };
struct PageRange
{ … };
struct AddressRange
{ … };
enum class PageSharingType
{ … };
class CoherentBuffer
{ … };
class CoherentBufferTracker final : angle::NonCopyable
{ … };
class FrameCaptureShared final : angle::NonCopyable
{ … };
template <typename CaptureFuncT, typename... ArgsT>
void CaptureGLCallToFrameCapture(CaptureFuncT captureFunc,
bool isCallValid,
gl::Context *context,
ArgsT... captureParams)
{ … }
template <typename FirstT, typename... OthersT>
egl::Display *GetEGLDisplayArg(FirstT display, OthersT... others)
{ … }
template <typename CaptureFuncT, typename... ArgsT>
void CaptureEGLCallToFrameCapture(CaptureFuncT captureFunc,
bool isCallValid,
egl::Thread *thread,
ArgsT... captureParams)
{ … }
void CaptureMemory(const void *source, size_t size, ParamCapture *paramCapture);
void CaptureString(const GLchar *str, ParamCapture *paramCapture);
void CaptureStringLimit(const GLchar *str, uint32_t limit, ParamCapture *paramCapture);
void CaptureVertexPointerGLES1(const gl::State &glState,
gl::ClientVertexArrayType type,
const void *pointer,
ParamCapture *paramCapture);
gl::Program *GetProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle);
void CaptureGetParameter(const gl::State &glState,
GLenum pname,
size_t typeSize,
ParamCapture *paramCapture);
void CaptureGetActiveUniformBlockivParameters(const gl::State &glState,
gl::ShaderProgramID handle,
gl::UniformBlockIndex uniformBlockIndex,
GLenum pname,
ParamCapture *paramCapture);
template <typename T>
void CaptureClearBufferValue(GLenum buffer, const T *value, ParamCapture *paramCapture)
{ … }
void CaptureGenHandlesImpl(GLsizei n, GLuint *handles, ParamCapture *paramCapture);
template <typename T>
void CaptureGenHandles(GLsizei n, T *handles, ParamCapture *paramCapture)
{ … }
template <typename T>
void CaptureArray(T *elements, GLsizei n, ParamCapture *paramCapture)
{ … }
void CaptureShaderStrings(GLsizei count,
const GLchar *const *strings,
const GLint *length,
ParamCapture *paramCapture);
}
template <typename T>
void CaptureTextureAndSamplerParameter_params(GLenum pname,
const T *param,
angle::ParamCapture *paramCapture)
{ … }
namespace egl
{
angle::ParamCapture CaptureAttributeMap(const egl::AttributeMap &attribMap);
}
#endif