#include "gpu/command_buffer/service/gpu_state_tracer.h"
#include <string_view>
#include "base/base64.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/trace_event/trace_event.h"
#include "context_state.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gl/gl_bindings.h"
namespace gpu {
namespace gles2 {
namespace {
const int kBytesPerPixel = …;
class Snapshot : public base::trace_event::ConvertableToTraceFormat { … };
}
Snapshot::Snapshot(const ContextState* state) : … { … }
std::unique_ptr<Snapshot> Snapshot::Create(const ContextState* state) { … }
bool Snapshot::SaveScreenshot(const gfx::Size& size) { … }
void Snapshot::AppendAsTraceFormat(std::string* out) const { … }
std::unique_ptr<GPUStateTracer> GPUStateTracer::Create(
const ContextState* state) { … }
GPUStateTracer::GPUStateTracer(const ContextState* state) : … { … }
GPUStateTracer::~GPUStateTracer() { … }
void GPUStateTracer::TakeSnapshotWithCurrentFramebuffer(const gfx::Size& size) { … }
}
}