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

Side by Side Diff: services/gfx/compositor/graph/resources.cc

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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "services/gfx/compositor/graph/resources.h" 5 #include "services/gfx/compositor/graph/resources.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace compositor { 9 namespace compositor {
10 10
11 Resource::Resource() {} 11 Resource::Resource() {}
12 12
13 Resource::~Resource() {} 13 Resource::~Resource() {}
14 14
15 SceneResource::SceneResource( 15 SceneResource::SceneResource(
16 const mojo::gfx::composition::SceneToken& scene_token, 16 const mojo::gfx::composition::SceneToken& scene_token)
17 const base::WeakPtr<SceneDef>& referenced_scene) 17 : scene_token_(scene_token) {}
18 : scene_token_(scene_token), referenced_scene_(referenced_scene) {}
19 18
20 SceneResource::~SceneResource() {} 19 SceneResource::~SceneResource() {}
21 20
22 scoped_refptr<const SceneResource> SceneResource::Unlink() const {
23 return new SceneResource(scene_token_, base::WeakPtr<SceneDef>());
24 }
25
26 Resource::Type SceneResource::type() const { 21 Resource::Type SceneResource::type() const {
27 return Type::kScene; 22 return Type::kScene;
28 } 23 }
29 24
30 ImageResource::ImageResource(const scoped_refptr<RenderImage>& image) 25 ImageResource::ImageResource(const scoped_refptr<RenderImage>& image)
31 : image_(image) { 26 : image_(image) {
32 DCHECK(image); 27 DCHECK(image);
33 } 28 }
34 29
35 ImageResource::~ImageResource() {} 30 ImageResource::~ImageResource() {}
36 31
37 Resource::Type ImageResource::type() const { 32 Resource::Type ImageResource::type() const {
38 return Type::kImage; 33 return Type::kImage;
39 } 34 }
40 35
41 } // namespace compositor 36 } // namespace compositor
OLDNEW
« no previous file with comments | « services/gfx/compositor/graph/resources.h ('k') | services/gfx/compositor/graph/scene_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698