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

Side by Side Diff: sky/compositor/surface_holder.h

Issue 744753003: Use the scheduler to drive the Sky compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/compositor/layer_host_client.h ('k') | sky/compositor/surface_holder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SKY_COMPOSITOR_SURFACE_HOLDER_H_ 5 #ifndef SKY_COMPOSITOR_SURFACE_HOLDER_H_
6 #define SKY_COMPOSITOR_SURFACE_HOLDER_H_ 6 #define SKY_COMPOSITOR_SURFACE_HOLDER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h" 10 #include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h"
11 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" 11 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h"
12 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h" 12 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h"
13 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 class Shell; 16 class Shell;
17 } 17 }
18 18
19 namespace sky { 19 namespace sky {
20 class SurfaceAllocator; 20 class SurfaceAllocator;
21 21
22 class SurfaceHolder : public mojo::SurfaceClient { 22 class SurfaceHolder : public mojo::SurfaceClient {
23 public: 23 public:
24 class Client { 24 class Client {
25 public: 25 public:
26 virtual void OnReadyForNextFrame() = 0;
27 virtual void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) = 0; 26 virtual void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) = 0;
28 virtual void ReturnResources( 27 virtual void ReturnResources(
29 mojo::Array<mojo::ReturnedResourcePtr> resources) = 0; 28 mojo::Array<mojo::ReturnedResourcePtr> resources) = 0;
30 29
31 protected: 30 protected:
32 virtual ~Client(); 31 virtual ~Client();
33 }; 32 };
34 33
35 explicit SurfaceHolder(Client* client, mojo::Shell* shell); 34 explicit SurfaceHolder(Client* client, mojo::Shell* shell);
36 ~SurfaceHolder() override; 35 ~SurfaceHolder() override;
(...skipping 17 matching lines...) Expand all
54 mojo::SurfaceIdPtr surface_id_; 53 mojo::SurfaceIdPtr surface_id_;
55 54
56 base::WeakPtrFactory<SurfaceHolder> weak_factory_; 55 base::WeakPtrFactory<SurfaceHolder> weak_factory_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder); 57 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder);
59 }; 58 };
60 59
61 } // namespace sky 60 } // namespace sky
62 61
63 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_ 62 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_
OLDNEW
« no previous file with comments | « sky/compositor/layer_host_client.h ('k') | sky/compositor/surface_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698