Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: cc/layers/surface_layer.h

Issue 2621653002: Remove stretch_content_to_fill_bounds from cc::SurfaceLayer::SetSurfaceInfo (Closed)
Patch Set: fix android Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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" 11 #include "cc/surfaces/surface_id.h"
12 #include "cc/surfaces/surface_info.h" 12 #include "cc/surfaces/surface_info.h"
13 #include "cc/surfaces/surface_reference_base.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:
24 static scoped_refptr<SurfaceLayer> Create( 24 static scoped_refptr<SurfaceLayer> Create(
25 scoped_refptr<SurfaceReferenceFactory> ref_factory); 25 scoped_refptr<SurfaceReferenceFactory> ref_factory);
26 26
27 void SetSurfaceInfo(const SurfaceInfo& surface_info);
28
27 // When stretch_content_to_fill_bounds is true, scale is unused. 29 // When stretch_content_to_fill_bounds is true, scale is unused.
danakj 2017/01/09 19:37:12 I think this comment doesn't quite work now, which
28 void SetSurfaceInfo(const SurfaceInfo& surface_info, 30 void SetStretchContentToFillBounds(bool stretch_content_to_fill_bounds);
29 bool stretch_content_to_fill_bounds);
30 31
31 // Layer overrides. 32 // Layer overrides.
32 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 33 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
33 void SetLayerTreeHost(LayerTreeHost* host) override; 34 void SetLayerTreeHost(LayerTreeHost* host) override;
34 void PushPropertiesTo(LayerImpl* layer) override; 35 void PushPropertiesTo(LayerImpl* layer) override;
35 36
36 scoped_refptr<SurfaceReferenceFactory> surface_reference_factory() const { 37 scoped_refptr<SurfaceReferenceFactory> surface_reference_factory() const {
37 return ref_factory_; 38 return ref_factory_;
38 } 39 }
39 const SurfaceInfo& surface_info() const { return surface_info_; } 40 const SurfaceInfo& surface_info() const { return surface_info_; }
(...skipping 10 matching lines...) Expand all
50 scoped_refptr<SurfaceReferenceFactory> ref_factory_; 51 scoped_refptr<SurfaceReferenceFactory> ref_factory_;
51 std::unique_ptr<SurfaceReferenceBase> current_ref_; 52 std::unique_ptr<SurfaceReferenceBase> current_ref_;
52 bool stretch_content_to_fill_bounds_ = false; 53 bool stretch_content_to_fill_bounds_ = false;
53 54
54 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); 55 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
55 }; 56 };
56 57
57 } // namespace cc 58 } // namespace cc
58 59
59 #endif // CC_LAYERS_SURFACE_LAYER_H_ 60 #endif // CC_LAYERS_SURFACE_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698