Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: services/gfx/compositor/graph/scene_label.h

Issue 1749063002: Mozart: Improve internal scene graph representation. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-0
Patch Set: avoid unnecessary hashtable lookups Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_
6 #define SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_
7
8 #include <string>
9
10 namespace compositor {
11
12 // Convenience class for formatting descriptive labels for diagnostics.
13 class SceneLabel {
14 public:
15 SceneLabel(uint32_t token, const std::string& label);
16 SceneLabel(const SceneLabel& other);
17 ~SceneLabel();
18
19 // Gets the scene token.
20 uint32_t token() const { return token_; }
21
22 // Gets the user-supplied label of the scene.
23 const std::string& label() const { return label_; }
24
25 // Gets a descriptive label including optional version and node information.
26 std::string FormattedLabel() const;
27 std::string FormattedLabelForVersion(uint32_t version) const;
28 std::string FormattedLabelForNode(uint32_t version, uint32_t node_id) const;
29
30 private:
31 uint32_t const token_;
32 std::string const label_;
33 };
34
35 } // namespace compositor
36
37 #endif // SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_
OLDNEW
« no previous file with comments | « services/gfx/compositor/graph/scene_def.cc ('k') | services/gfx/compositor/graph/scene_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698