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

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

Issue 753643002: Enable the Sky compositor again (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar comments 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.cc ('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"
(...skipping 16 matching lines...) Expand all
27 virtual void ReturnResources( 27 virtual void ReturnResources(
28 mojo::Array<mojo::ReturnedResourcePtr> resources) = 0; 28 mojo::Array<mojo::ReturnedResourcePtr> resources) = 0;
29 29
30 protected: 30 protected:
31 virtual ~Client(); 31 virtual ~Client();
32 }; 32 };
33 33
34 explicit SurfaceHolder(Client* client, mojo::Shell* shell); 34 explicit SurfaceHolder(Client* client, mojo::Shell* shell);
35 ~SurfaceHolder() override; 35 ~SurfaceHolder() override;
36 36
37 bool IsReadyForFrame() const;
38
37 void SetSize(const gfx::Size& size); 39 void SetSize(const gfx::Size& size);
38 void SubmitFrame(mojo::FramePtr frame); 40 void SubmitFrame(mojo::FramePtr frame);
39 41
40 private: 42 private:
41 // mojo::SurfaceClient 43 // mojo::SurfaceClient
42 void ReturnResources( 44 void ReturnResources(
43 mojo::Array<mojo::ReturnedResourcePtr> resources) override; 45 mojo::Array<mojo::ReturnedResourcePtr> resources) override;
44 46
45 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface, 47 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface,
46 uint32_t id_namespace); 48 uint32_t id_namespace);
47 49
48 Client* client_; 50 Client* client_;
49 gfx::Size size_; 51 gfx::Size size_;
50 scoped_ptr<SurfaceAllocator> surface_allocator_; 52 scoped_ptr<SurfaceAllocator> surface_allocator_;
51 mojo::SurfacesServicePtr surfaces_service_; 53 mojo::SurfacesServicePtr surfaces_service_;
52 mojo::SurfacePtr surface_; 54 mojo::SurfacePtr surface_;
53 mojo::SurfaceIdPtr surface_id_; 55 mojo::SurfaceIdPtr surface_id_;
54 56
55 base::WeakPtrFactory<SurfaceHolder> weak_factory_; 57 base::WeakPtrFactory<SurfaceHolder> weak_factory_;
56 58
57 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder); 59 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder);
58 }; 60 };
59 61
60 } // namespace sky 62 } // namespace sky
61 63
62 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_ 64 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_
OLDNEW
« no previous file with comments | « sky/compositor/layer_host.cc ('k') | sky/compositor/surface_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698