#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/client/readback_buffer_shadow_tracker.h"
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
#include "gpu/command_buffer/client/mapped_memory.h"
namespace gpu {
namespace gles2 {
ReadbackBufferShadowTracker::Buffer::Buffer(GLuint buffer_id,
MappedMemoryManager* mapped_memory,
GLES2CmdHelper* helper)
: … { … }
ReadbackBufferShadowTracker::Buffer::~Buffer() { … }
uint32_t ReadbackBufferShadowTracker::Buffer::Alloc(int32_t* shm_id,
uint32_t* shm_offset,
bool* already_allocated) { … }
void ReadbackBufferShadowTracker::Buffer::Free() { … }
void* ReadbackBufferShadowTracker::Buffer::MapReadbackShm(uint32_t offset,
uint32_t map_size) { … }
bool ReadbackBufferShadowTracker::Buffer::UnmapReadbackShm() { … }
void ReadbackBufferShadowTracker::Buffer::UpdateSerialTo(uint64_t serial) { … }
ReadbackBufferShadowTracker::ReadbackBufferShadowTracker(
MappedMemoryManager* mapped_memory,
GLES2CmdHelper* helper)
: … { … }
ReadbackBufferShadowTracker::~ReadbackBufferShadowTracker() { … }
ReadbackBufferShadowTracker::Buffer*
ReadbackBufferShadowTracker::GetOrCreateBuffer(GLuint id, GLuint size) { … }
void ReadbackBufferShadowTracker::OnBufferWrite(GLuint id) { … }
ReadbackBufferShadowTracker::BufferList
ReadbackBufferShadowTracker::TakeUnfencedBufferList() { … }
}
}