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

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

Issue 797063002: Make reftests work for sky. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review comments Created 6 years 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/display_delegate_ganesh.cc ('k') | sky/compositor/layer.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_LAYER_H_ 5 #ifndef SKY_COMPOSITOR_LAYER_H_
6 #define SKY_COMPOSITOR_LAYER_H_ 6 #define SKY_COMPOSITOR_LAYER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "mojo/gpu/gl_texture.h" 9 #include "mojo/gpu/gl_texture.h"
10 #include "sky/compositor/layer_client.h" 10 #include "sky/compositor/layer_client.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 12
13 namespace sky { 13 namespace sky {
14
15 class DisplayDelegate;
14 class LayerHost; 16 class LayerHost;
15 17
16 class Layer : public base::RefCounted<Layer> { 18 class Layer : public base::RefCounted<Layer> {
17 public: 19 public:
18 explicit Layer(LayerClient* client); 20 explicit Layer(LayerClient* client);
19 21
20 void ClearClient();
21
22 void SetSize(const gfx::Size& size); 22 void SetSize(const gfx::Size& size);
23 void GetPixelsForTesting(std::vector<unsigned char>* pixels);
23 void Display(); 24 void Display();
24 25
25 scoped_ptr<mojo::GLTexture> GetTexture(); 26 scoped_ptr<mojo::GLTexture> GetTexture();
26 27
27 const gfx::Size& size() const { return size_; } 28 const gfx::Size& size() const { return size_; }
28 29
29 void set_host(LayerHost* host) { host_ = host; } 30 void set_host(LayerHost* host) { host_ = host; }
30 31
31 private: 32 private:
32 friend class base::RefCounted<Layer>; 33 friend class base::RefCounted<Layer>;
33 ~Layer(); 34 ~Layer();
34 35
35 LayerClient* client_; 36 LayerClient* client_;
36 LayerHost* host_; 37 LayerHost* host_;
37 gfx::Size size_; 38 gfx::Size size_;
38
39 scoped_ptr<mojo::GLTexture> texture_; 39 scoped_ptr<mojo::GLTexture> texture_;
40 scoped_ptr<DisplayDelegate> delegate_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(Layer); 42 DISALLOW_COPY_AND_ASSIGN(Layer);
42 }; 43 };
43 44
44 } // namespace sky 45 } // namespace sky
45 46
46 #endif // SKY_COMPOSITOR_LAYER_H_ 47 #endif // SKY_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « sky/compositor/display_delegate_ganesh.cc ('k') | sky/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698