Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / gpu / command_buffer / service / gpu_state_tracer.h
blob38998f325b904edfa97f8d54a7a428160a47446d
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace gfx {
12 class Size;
15 namespace gpu {
16 namespace gles2 {
18 struct ContextState;
20 // Saves GPU state such as framebuffer contents while tracing.
21 class GPUStateTracer {
22 public:
23 static scoped_ptr<GPUStateTracer> Create(const ContextState* state);
24 ~GPUStateTracer();
26 // Take a state snapshot with a screenshot of the currently bound framebuffer.
27 void TakeSnapshotWithCurrentFramebuffer(const gfx::Size& size);
29 private:
30 explicit GPUStateTracer(const ContextState* state);
32 const ContextState* state_;
33 DISALLOW_COPY_AND_ASSIGN(GPUStateTracer);
36 } // namespace gles2
37 } // namespace gpu
39 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_