Chromium Code Reviews| Index: gpu/command_buffer/service/gpu_tracer.h |
| diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..66903b6245958f57beb83be0e06612423457b5d8 |
| --- /dev/null |
| +++ b/gpu/command_buffer/service/gpu_tracer.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +// This file contains the GPUTrace class. |
| +#ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
| +#define GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
| + |
| +#include <string> |
|
jonathan.backer
2012/12/03 14:23:14
necessary? (maybe if you return std::string as des
dsinclair
2012/12/03 16:47:42
Done.
|
| + |
| +#include "base/basictypes.h" |
|
jonathan.backer
2012/12/03 14:23:14
necessary?
dsinclair
2012/12/03 16:47:42
This is needed for the DISALLOW_COPY_AND_ASSIGN ma
|
| +#include "base/memory/scoped_ptr.h" |
| + |
| +namespace gpu { |
| +namespace gles2 { |
| + |
| +// Traces GPU Commands. |
| +class GPUTracer { |
| + public: |
| + static scoped_ptr<GPUTracer> Create(); |
| + |
| + GPUTracer() {} |
| + virtual ~GPUTracer() {}; |
| + |
| + // Begin a trace. |
| + virtual bool Begin(const std::string& name) = 0; |
| + |
| + // End the last started trace. |
| + virtual bool End() = 0; |
| + |
| + // Process any completed traces. |
| + virtual void Process() = 0; |
| + |
| + // Retrieve the name of the current trace. |
|
jonathan.backer
2012/12/03 14:23:14
current trace ==> current open trace?
dsinclair
2012/12/03 16:47:42
Done.
|
| + virtual const char* CurrentName() = 0; |
|
jonathan.backer
2012/12/03 14:23:14
This is generally an unsafe API because someone ca
dsinclair
2012/12/03 16:47:42
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(GPUTracer); |
| +}; |
| + |
| +} // namespace gles2 |
| +} // namespace gpu |
| + |
| +#endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |