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 CC_LAYERS_SURFACE_LAYER_H_ | 5 #ifndef CC_LAYERS_SURFACE_LAYER_H_ |
6 #define CC_LAYERS_SURFACE_LAYER_H_ | 6 #define CC_LAYERS_SURFACE_LAYER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
11 #include "cc/surfaces/surface_id.h" | |
12 #include "cc/surfaces/surface_info.h" | 11 #include "cc/surfaces/surface_info.h" |
13 #include "cc/surfaces/surface_reference_base.h" | |
14 #include "cc/surfaces/surface_reference_factory.h" | 12 #include "cc/surfaces/surface_reference_factory.h" |
15 #include "cc/surfaces/surface_sequence.h" | |
16 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
17 | 14 |
18 namespace cc { | 15 namespace cc { |
19 | 16 |
20 // A layer that renders a surface referencing the output of another compositor | 17 // A layer that renders a surface referencing the output of another compositor |
21 // instance or client. | 18 // instance or client. |
22 class CC_EXPORT SurfaceLayer : public Layer { | 19 class CC_EXPORT SurfaceLayer : public Layer { |
23 public: | 20 public: |
24 static scoped_refptr<SurfaceLayer> Create( | 21 static scoped_refptr<SurfaceLayer> Create( |
25 scoped_refptr<SurfaceReferenceFactory> ref_factory); | 22 scoped_refptr<SurfaceReferenceFactory> ref_factory); |
(...skipping 15 matching lines...) Expand all Loading... |
41 protected: | 38 protected: |
42 explicit SurfaceLayer(scoped_refptr<SurfaceReferenceFactory> ref_factory); | 39 explicit SurfaceLayer(scoped_refptr<SurfaceReferenceFactory> ref_factory); |
43 bool HasDrawableContent() const override; | 40 bool HasDrawableContent() const override; |
44 | 41 |
45 private: | 42 private: |
46 ~SurfaceLayer() override; | 43 ~SurfaceLayer() override; |
47 void RemoveCurrentReference(); | 44 void RemoveCurrentReference(); |
48 | 45 |
49 SurfaceInfo surface_info_; | 46 SurfaceInfo surface_info_; |
50 scoped_refptr<SurfaceReferenceFactory> ref_factory_; | 47 scoped_refptr<SurfaceReferenceFactory> ref_factory_; |
51 std::unique_ptr<SurfaceReferenceBase> current_ref_; | 48 base::Closure reference_returner_; |
52 bool stretch_content_to_fill_bounds_ = false; | 49 bool stretch_content_to_fill_bounds_ = false; |
53 | 50 |
54 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); | 51 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); |
55 }; | 52 }; |
56 | 53 |
57 } // namespace cc | 54 } // namespace cc |
58 | 55 |
59 #endif // CC_LAYERS_SURFACE_LAYER_H_ | 56 #endif // CC_LAYERS_SURFACE_LAYER_H_ |
OLD | NEW |