| Index: cc/layers/surface_layer.h
|
| diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
|
| index 6b02364106417e7af217c7f5db57a76d8d5b3dd4..2f3d6f5307a3039a8ecf438650a43c3585db5838 100644
|
| --- a/cc/layers/surface_layer.h
|
| +++ b/cc/layers/surface_layer.h
|
| @@ -23,6 +23,10 @@ class CC_EXPORT SurfaceLayer : public Layer {
|
|
|
| void SetSurfaceInfo(const SurfaceInfo& surface_info);
|
|
|
| + // The current |surface_info_| becomes the |fallback_surface_info_| and the
|
| + // reference to the current fallback is removed.
|
| + void SwapSurfaceInfo(const SurfaceInfo& surface_info);
|
| +
|
| // When stretch_content_to_fill_bounds is true, the scale of the embedded
|
| // surface is ignored and the content will be stretched to fill the bounds.
|
| void SetStretchContentToFillBounds(bool stretch_content_to_fill_bounds);
|
| @@ -35,7 +39,14 @@ class CC_EXPORT SurfaceLayer : public Layer {
|
| scoped_refptr<SurfaceReferenceFactory> surface_reference_factory() const {
|
| return ref_factory_;
|
| }
|
| - const SurfaceInfo& surface_info() const { return surface_info_; }
|
| +
|
| + const SurfaceInfo& primary_surface_info() const {
|
| + return primary_surface_info_;
|
| + }
|
| +
|
| + const SurfaceInfo& fallback_surface_info() const {
|
| + return fallback_surface_info_;
|
| + }
|
|
|
| protected:
|
| explicit SurfaceLayer(scoped_refptr<SurfaceReferenceFactory> ref_factory);
|
| @@ -43,11 +54,15 @@ class CC_EXPORT SurfaceLayer : public Layer {
|
|
|
| private:
|
| ~SurfaceLayer() override;
|
| - void RemoveCurrentReference();
|
| + void RemoveReference(base::Closure reference_returner);
|
| +
|
| + SurfaceInfo primary_surface_info_;
|
| + base::Closure primary_reference_returner_;
|
| +
|
| + SurfaceInfo fallback_surface_info_;
|
| + base::Closure fallback_reference_returner_;
|
|
|
| - SurfaceInfo surface_info_;
|
| scoped_refptr<SurfaceReferenceFactory> ref_factory_;
|
| - base::Closure reference_returner_;
|
| bool stretch_content_to_fill_bounds_ = false;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
|
|
|