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

Unified Diff: services/gfx/compositor/graph/scene_def.h

Issue 1874593002: Mozart: Rename scene graph classes. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-2
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/gfx/compositor/graph/scene_content.cc ('k') | services/gfx/compositor/graph/scene_def.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/graph/scene_def.h
diff --git a/services/gfx/compositor/graph/scene_def.h b/services/gfx/compositor/graph/scene_def.h
index 4af7d9d2af209d6ca1c35daed01f0f1273f24d64..ed2b7f3037aa09c81ca2a87a0fcf538ef4481a78 100644
--- a/services/gfx/compositor/graph/scene_def.h
+++ b/services/gfx/compositor/graph/scene_def.h
@@ -16,8 +16,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "mojo/services/gfx/composition/interfaces/scenes.mojom.h"
-#include "services/gfx/compositor/graph/node_def.h"
-#include "services/gfx/compositor/graph/resource_def.h"
+#include "services/gfx/compositor/graph/nodes.h"
+#include "services/gfx/compositor/graph/resources.h"
#include "services/gfx/compositor/graph/scene_label.h"
namespace compositor {
@@ -34,11 +34,11 @@ using SceneResolver = base::Callback<base::WeakPtr<SceneDef>(
using SceneUnavailableSender = base::Callback<void(uint32_t)>;
// Scene definition.
-// Contains all of the resources and nodes of a published scene.
//
-// TODO(jeffbrown): Consider renaming to |Scene| since there is now an
-// asymmetry between the stateful nature of this class compared with
-// |NodeDef| and |ResourceDef| which are immutable but similarly named.
+// Contains the client-supplied content that makes up a scene in an
+// incrementally updatable form. As part of preparing the scene for
+// presentation, the content is gathered up into an immutable
+// |SceneContent| object.
class SceneDef {
public:
// Outcome of a call to |Present|.
@@ -87,9 +87,9 @@ class SceneDef {
const SceneUnavailableSender& unavailable_sender);
// Finds resources or nodes in the current version, returns nullptr if absent.
- const ResourceDef* FindResource(uint32_t resource_id) const;
- const NodeDef* FindNode(uint32_t node_id) const;
- const NodeDef* FindRootNode() const {
+ const Resource* FindResource(uint32_t resource_id) const;
+ const Node* FindNode(uint32_t node_id) const;
+ const Node* FindRootNode() const {
return FindNode(mojo::gfx::composition::kSceneRootNodeId);
}
@@ -119,13 +119,13 @@ class SceneDef {
const SceneUnavailableSender& unavailable_sender,
std::ostream& err);
- scoped_refptr<const ResourceDef> CreateResource(
+ scoped_refptr<const Resource> CreateResource(
uint32_t resource_id,
mojo::gfx::composition::ResourcePtr resource_decl,
const SceneResolver& resolver,
const SceneUnavailableSender& unavailable_sender,
std::ostream& err);
- scoped_refptr<const NodeDef> CreateNode(
+ scoped_refptr<const Node> CreateNode(
uint32_t node_id,
mojo::gfx::composition::NodePtr node_decl,
std::ostream& err);
@@ -136,8 +136,8 @@ class SceneDef {
std::vector<std::unique_ptr<Publication>> pending_publications_;
uint32_t version_ = mojo::gfx::composition::kSceneVersionNone;
- std::unordered_map<uint32_t, scoped_refptr<const ResourceDef>> resources_;
- std::unordered_map<uint32_t, scoped_refptr<const NodeDef>> nodes_;
+ std::unordered_map<uint32_t, scoped_refptr<const Resource>> resources_;
+ std::unordered_map<uint32_t, scoped_refptr<const Node>> nodes_;
scoped_refptr<const SceneContent> content_;
« no previous file with comments | « services/gfx/compositor/graph/scene_content.cc ('k') | services/gfx/compositor/graph/scene_def.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698