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