| 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 | |
| 46 private: | 44 private: |
| 47 enum State { | 45 enum State { |
| 48 kReadyForFrame, | 46 kReadyForFrame, |
| 49 kWaitingForFrameAcknowldgement, | 47 kWaitingForFrameAcknowldgement, |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 // SurfaceHolder::Client | 50 // SurfaceHolder::Client |
| 53 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; | 51 void OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) override; |
| 54 void ReturnResources( | 52 void ReturnResources( |
| 55 mojo::Array<mojo::ReturnedResourcePtr> resources) override; | 53 mojo::Array<mojo::ReturnedResourcePtr> resources) override; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 70 scoped_refptr<Layer> root_layer_; | 68 scoped_refptr<Layer> root_layer_; |
| 71 | 69 |
| 72 base::WeakPtrFactory<LayerHost> weak_factory_; | 70 base::WeakPtrFactory<LayerHost> weak_factory_; |
| 73 | 71 |
| 74 DISALLOW_COPY_AND_ASSIGN(LayerHost); | 72 DISALLOW_COPY_AND_ASSIGN(LayerHost); |
| 75 }; | 73 }; |
| 76 | 74 |
| 77 } // namespace sky | 75 } // namespace sky |
| 78 | 76 |
| 79 #endif // SKY_COMPOSITOR_LAYER_HOST_H_ | 77 #endif // SKY_COMPOSITOR_LAYER_HOST_H_ |
| OLD | NEW |