OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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. |
| 4 |
| 5 // This file contains the GPUTrace class. |
| 6 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
| 7 #define GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" |
| 13 |
| 14 namespace gpu { |
| 15 namespace gles2 { |
| 16 |
| 17 // Traces GPU Commands. |
| 18 class GPUTracer { |
| 19 public: |
| 20 static scoped_ptr<GPUTracer> Create(); |
| 21 |
| 22 GPUTracer() {} |
| 23 virtual ~GPUTracer() {}; |
| 24 |
| 25 // Begin a trace. |
| 26 virtual bool Begin(const std::string& name) = 0; |
| 27 |
| 28 // End the last started trace. |
| 29 virtual bool End() = 0; |
| 30 |
| 31 // Process any completed traces. |
| 32 virtual void Process() = 0; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(GPUTracer); |
| 36 }; |
| 37 |
| 38 } // namespace gles2 |
| 39 } // namespace gpu |
| 40 |
| 41 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_TRACER_H_ |
OLD | NEW |