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

Unified Diff: services/gfx/compositor/graph/resource_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/nodes.cc ('k') | services/gfx/compositor/graph/resource_def.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/graph/resource_def.h
diff --git a/services/gfx/compositor/graph/resource_def.h b/services/gfx/compositor/graph/resource_def.h
deleted file mode 100644
index c10d021ff2f22ad4d34c75dc34344d488ba27ca9..0000000000000000000000000000000000000000
--- a/services/gfx/compositor/graph/resource_def.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_GFX_COMPOSITOR_GRAPH_RESOURCE_DEF_H_
-#define SERVICES_GFX_COMPOSITOR_GRAPH_RESOURCE_DEF_H_
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/services/gfx/composition/interfaces/resources.mojom.h"
-#include "services/gfx/compositor/render/render_image.h"
-
-namespace compositor {
-
-class SceneDef;
-
-// Abstract scene graph resource definition.
-//
-// Instances of this class are immutable and reference counted so they may
-// be shared by multiple versions of the same scene.
-class ResourceDef : public base::RefCounted<ResourceDef> {
- public:
- enum class Type { kScene, kImage };
-
- ResourceDef();
-
- // Gets the resource type.
- virtual Type type() const = 0;
-
- protected:
- friend class base::RefCounted<ResourceDef>;
- virtual ~ResourceDef();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ResourceDef);
-};
-
-// Reference to another scene expressed as a resource definition.
-class SceneResourceDef : public ResourceDef {
- public:
- explicit SceneResourceDef(
- const mojo::gfx::composition::SceneToken& scene_token,
- const base::WeakPtr<SceneDef>& referenced_scene);
-
- Type type() const override;
-
- const mojo::gfx::composition::SceneToken& scene_token() const {
- return scene_token_;
- }
-
- // The referenced scene, may be null if the scene is unavailable.
- const base::WeakPtr<SceneDef>& referenced_scene() const {
- return referenced_scene_;
- }
-
- // Returns a copy of the resource without its referenced scene.
- scoped_refptr<const SceneResourceDef> Unlink() const;
-
- protected:
- ~SceneResourceDef() override;
-
- private:
- mojo::gfx::composition::SceneToken scene_token_;
- base::WeakPtr<SceneDef> referenced_scene_;
-
- DISALLOW_COPY_AND_ASSIGN(SceneResourceDef);
-};
-
-// Reference to an image expressed as a resource definition.
-class ImageResourceDef : public ResourceDef {
- public:
- explicit ImageResourceDef(const scoped_refptr<RenderImage>& image);
-
- Type type() const override;
-
- // The referenced image, never null.
- const scoped_refptr<RenderImage>& image() const { return image_; }
-
- protected:
- ~ImageResourceDef() override;
-
- private:
- scoped_refptr<RenderImage> image_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageResourceDef);
-};
-
-} // namespace compositor
-
-#endif // SERVICES_GFX_COMPOSITOR_GRAPH_RESOURCE_DEF_H_
« no previous file with comments | « services/gfx/compositor/graph/nodes.cc ('k') | services/gfx/compositor/graph/resource_def.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698