#include "libANGLE/renderer/gl/BufferGL.h"
#include "common/debug.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/gl/ContextGL.h"
#include "libANGLE/renderer/gl/FunctionsGL.h"
#include "libANGLE/renderer/gl/StateManagerGL.h"
#include "libANGLE/renderer/gl/renderergl_utils.h"
namespace rx
{
namespace
{
bool KeepBufferShadowCopy(const gl::Context *context, gl::WebGLBufferType webglType)
{ … }
}
static constexpr gl::BufferBinding SourceBufferOperationTarget = …;
static constexpr gl::BufferBinding DestBufferOperationTarget = …;
BufferGL::BufferGL(const gl::BufferState &state, GLuint buffer)
: … { … }
BufferGL::~BufferGL()
{ … }
void BufferGL::destroy(const gl::Context *context)
{ … }
angle::Result BufferGL::setData(const gl::Context *context,
gl::BufferBinding target,
const void *data,
size_t size,
gl::BufferUsage usage)
{ … }
angle::Result BufferGL::setSubData(const gl::Context *context,
gl::BufferBinding target,
const void *data,
size_t size,
size_t offset)
{ … }
angle::Result BufferGL::copySubData(const gl::Context *context,
BufferImpl *source,
GLintptr sourceOffset,
GLintptr destOffset,
GLsizeiptr size)
{ … }
angle::Result BufferGL::map(const gl::Context *context, GLenum access, void **mapPtr)
{ … }
angle::Result BufferGL::mapRange(const gl::Context *context,
size_t offset,
size_t length,
GLbitfield access,
void **mapPtr)
{ … }
angle::Result BufferGL::unmap(const gl::Context *context, GLboolean *result)
{ … }
angle::Result BufferGL::getIndexRange(const gl::Context *context,
gl::DrawElementsType type,
size_t offset,
size_t count,
bool primitiveRestartEnabled,
gl::IndexRange *outRange)
{ … }
size_t BufferGL::getBufferSize() const
{ … }
GLuint BufferGL::getBufferID() const
{ … }
}