| // Copyright 2013 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_ |
| #define GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_ |
| #include "base/memory/raw_ptr.h" |
| // Saves GPU state such as framebuffer contents while tracing. |
| static std::unique_ptr<GPUStateTracer> Create(const ContextState* state); |
| GPUStateTracer(const GPUStateTracer&) = delete; |
| GPUStateTracer& operator=(const GPUStateTracer&) = delete; |
| // Take a state snapshot with a screenshot of the currently bound framebuffer. |
| void TakeSnapshotWithCurrentFramebuffer(const gfx::Size& size); |
| explicit GPUStateTracer(const ContextState* state); |
| raw_ptr<const ContextState> state_; |
| #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_ |