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 #include "gpu/command_buffer/common/debug_marker_manager.h"
10 DebugMarkerManager::Group::Group(const std::string
& name
)
15 DebugMarkerManager::Group::~Group() {
18 void DebugMarkerManager::Group::SetMarker(const std::string
& marker
) {
19 marker_
= name_
+ "." + marker
;
22 DebugMarkerManager::DebugMarkerManager() {
24 group_stack_
.push(Group(std::string("")));
27 DebugMarkerManager::~DebugMarkerManager() {
30 void DebugMarkerManager::SetMarker(const std::string
& marker
) {
31 group_stack_
.top().SetMarker(marker
);
34 const std::string
& DebugMarkerManager::GetMarker() const {
35 return group_stack_
.top().marker();
38 void DebugMarkerManager::PushGroup(const std::string
& name
) {
39 group_stack_
.push(Group(group_stack_
.top().name() + "." + name
));
42 void DebugMarkerManager::PopGroup(void) {
43 if (group_stack_
.size() > 1) {