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

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

Issue 1873573003: Mozart: Ensure time always runs forward. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: fix build error on Android Created 4 years, 8 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_ 5 #ifndef SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_
6 #define SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_ 6 #define SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace compositor { 10 namespace compositor {
11 11
12 // Convenience class for formatting descriptive labels for diagnostics. 12 // Convenience class for formatting descriptive labels for diagnostics.
13 class SceneLabel { 13 class SceneLabel {
14 public: 14 public:
15 SceneLabel(uint32_t token, const std::string& label); 15 SceneLabel(uint32_t token, const std::string& label);
16 SceneLabel(const SceneLabel& other); 16 SceneLabel(const SceneLabel& other);
17 ~SceneLabel(); 17 ~SceneLabel();
18 18
19 // Gets the scene token. 19 // Gets the scene token.
20 uint32_t token() const { return token_; } 20 uint32_t token() const { return token_; }
21 21
22 // Gets the user-supplied label of the scene. 22 // Gets the user-supplied label of the scene.
23 const std::string& label() const { return label_; } 23 const std::string& label() const { return label_; }
24 24
25 // Gets a descriptive label including optional version and node information. 25 // Gets a descriptive label including optional version and node information.
26 std::string FormattedLabel() const; 26 std::string FormattedLabel() const;
27 std::string FormattedLabelForVersion(uint32_t version) const; 27 std::string FormattedLabelForVersion(uint32_t version,
28 std::string FormattedLabelForNode(uint32_t version, uint32_t node_id) const; 28 int64_t presentation_time) const;
29 std::string FormattedLabelForNode(uint32_t version,
30 int64_t presentation_time,
31 uint32_t node_id) const;
29 32
30 private: 33 private:
31 uint32_t const token_; 34 uint32_t const token_;
32 std::string const label_; 35 std::string const label_;
33 }; 36 };
34 37
35 } // namespace compositor 38 } // namespace compositor
36 39
37 #endif // SERVICES_GFX_COMPOSITOR_GRAPH_SCENE_LABEL_H_ 40 #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