OLD | NEW |
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_HOST_H_ | 5 #ifndef SKY_COMPOSITOR_LAYER_HOST_H_ |
6 #define SKY_COMPOSITOR_LAYER_HOST_H_ | 6 #define SKY_COMPOSITOR_LAYER_HOST_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 return const_cast<mojo::GaneshContext*>(&ganesh_context_); | 34 return const_cast<mojo::GaneshContext*>(&ganesh_context_); |
35 } | 35 } |
36 | 36 |
37 ResourceManager* resource_manager() const { | 37 ResourceManager* resource_manager() const { |
38 return const_cast<ResourceManager*>(&resource_manager_); | 38 return const_cast<ResourceManager*>(&resource_manager_); |
39 } | 39 } |
40 | 40 |
41 void SetNeedsAnimate(); | 41 void SetNeedsAnimate(); |
42 void SetRootLayer(scoped_refptr<Layer> layer); | 42 void SetRootLayer(scoped_refptr<Layer> layer); |
43 | 43 |
| 44 void GetPixelsForTesting(std::vector<unsigned char>* pixels); |
| 45 |
44 private: | 46 private: |
45 enum State { | 47 enum State { |
46 kWaitingForSurfaceService, | 48 kWaitingForSurfaceService, |
47 kReadyForFrame, | 49 kReadyForFrame, |
48 kWaitingForFrameAcknowldgement, | 50 kWaitingForFrameAcknowldgement, |
49 }; | 51 }; |
50 | 52 |
51 // SurfaceHolder::Client | 53 // SurfaceHolder::Client |
52 void OnSurfaceConnectionCreated() override; | 54 void OnSurfaceConnectionCreated() override; |
53 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; | 55 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; |
(...skipping 16 matching lines...) Expand all Loading... |
70 scoped_refptr<Layer> root_layer_; | 72 scoped_refptr<Layer> root_layer_; |
71 | 73 |
72 base::WeakPtrFactory<LayerHost> weak_factory_; | 74 base::WeakPtrFactory<LayerHost> weak_factory_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(LayerHost); | 76 DISALLOW_COPY_AND_ASSIGN(LayerHost); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace sky | 79 } // namespace sky |
78 | 80 |
79 #endif // SKY_COMPOSITOR_LAYER_HOST_H_ | 81 #endif // SKY_COMPOSITOR_LAYER_HOST_H_ |
OLD | NEW |