#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/service/multi_draw_manager.h"
#include <algorithm>
#include "base/check.h"
#include "base/notreached.h"
#include "base/numerics/checked_math.h"
namespace gpu {
namespace gles2 {
MultiDrawManager::ResultData::ResultData() = default;
MultiDrawManager::ResultData::~ResultData() = default;
MultiDrawManager::ResultData::ResultData(ResultData&& rhs)
: … { … }
MultiDrawManager::ResultData& MultiDrawManager::ResultData::operator=(
ResultData&& rhs) { … }
MultiDrawManager::MultiDrawManager(IndexStorageType index_type)
: … { … }
bool MultiDrawManager::Begin(GLsizei drawcount) { … }
bool MultiDrawManager::End(ResultData* result) { … }
bool MultiDrawManager::MultiDrawArrays(GLenum mode,
const GLint* firsts,
const GLsizei* counts,
GLsizei drawcount) { … }
bool MultiDrawManager::MultiDrawArraysInstanced(GLenum mode,
const GLint* firsts,
const GLsizei* counts,
const GLsizei* instance_counts,
GLsizei drawcount) { … }
bool MultiDrawManager::MultiDrawArraysInstancedBaseInstance(
GLenum mode,
const GLint* firsts,
const GLsizei* counts,
const GLsizei* instance_counts,
const GLuint* baseinstances,
GLsizei drawcount) { … }
bool MultiDrawManager::MultiDrawElements(GLenum mode,
const GLsizei* counts,
GLenum type,
const GLsizei* offsets,
GLsizei drawcount) { … }
bool MultiDrawManager::MultiDrawElementsInstanced(
GLenum mode,
const GLsizei* counts,
GLenum type,
const GLsizei* offsets,
const GLsizei* instance_counts,
GLsizei drawcount) { … }
bool MultiDrawManager::MultiDrawElementsInstancedBaseVertexBaseInstance(
GLenum mode,
const GLsizei* counts,
GLenum type,
const GLsizei* offsets,
const GLsizei* instance_counts,
const GLint* basevertices,
const GLuint* baseinstances,
GLsizei drawcount) { … }
void MultiDrawManager::ResizeArrays() { … }
bool MultiDrawManager::ValidateDrawcount(GLsizei drawcount) const { … }
bool MultiDrawManager::EnsureDrawArraysFunction(DrawFunction draw_function,
GLenum mode,
GLsizei drawcount) { … }
bool MultiDrawManager::EnsureDrawElementsFunction(DrawFunction draw_function,
GLenum mode,
GLenum type,
GLsizei drawcount) { … }
void MultiDrawManager::CopyArraysHelper(GLsizei drawcount,
const GLint* firsts,
const GLsizei* counts,
const GLsizei* offsets,
const GLsizei* instance_counts,
const GLint* basevertices,
const GLuint* baseinstances) { … }
}
}