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.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_DEBUG_MARKER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_DEBUG_MARKER_MANAGER_H_
10 #include "gpu/gpu_export.h"
15 // Tracks debug marker.
16 class GPU_EXPORT DebugMarkerManager {
19 ~DebugMarkerManager();
21 // Gets the current marker on the top group.
22 const std::string& GetMarker() const;
23 // Sets the current marker on the top group.
24 void SetMarker(const std::string& marker);
25 // Pushes a new group.
26 void PushGroup(const std::string& name);
27 // Removes the top group. This is safe to call even when stack is empty.
31 // Info about Buffers currently in the system.
34 explicit Group(const std::string& name);
37 const std::string& name() const {
41 void SetMarker(const std::string& marker);
43 const std::string& marker() const {
52 typedef std::stack<Group> GroupStack;
54 GroupStack group_stack_;
61 #endif // GPU_COMMAND_BUFFER_SERVICE_DEBUG_MARKER_MANAGER_H_