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

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

Issue 740923002: Add a simple compositor for Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address reviewer 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_COMPOSITOR_LAYER_H_
6 #define SKY_COMPOSITOR_LAYER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "mojo/gpu/gl_texture.h"
10 #include "sky/compositor/layer_client.h"
11 #include "ui/gfx/geometry/rect.h"
12
13 namespace sky {
14 class LayerHost;
15
16 class Layer : public base::RefCounted<Layer> {
17 public:
18 explicit Layer(LayerClient* client);
19
20 void ClearClient();
21
22 void SetSize(const gfx::Size& size);
23 void Display();
24
25 scoped_ptr<mojo::GLTexture> GetTexture();
26
27 const gfx::Size& size() const { return size_; }
28
29 void set_host(LayerHost* host) { host_ = host; }
30
31 private:
32 friend class base::RefCounted<Layer>;
33 ~Layer();
34
35 LayerClient* client_;
36 LayerHost* host_;
37 gfx::Size size_;
38
39 scoped_ptr<mojo::GLTexture> texture_;
40
41 DISALLOW_COPY_AND_ASSIGN(Layer);
42 };
43
44 } // namespace sky
45
46 #endif // SKY_COMPOSITOR_LAYER_H_
OLDNEW
« sky/compositor/BUILD.gn ('K') | « sky/compositor/BUILD.gn ('k') | sky/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698