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

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

Issue 2616403003: Replacing SurfaceReferenceBase and SequenceSurfaceReference with Closures (Closed)
Patch Set: c 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
« no previous file with comments | « base/callback_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
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 17 matching lines...) Expand all
43 protected: 40 protected:
44 explicit SurfaceLayer(scoped_refptr<SurfaceReferenceFactory> ref_factory); 41 explicit SurfaceLayer(scoped_refptr<SurfaceReferenceFactory> ref_factory);
45 bool HasDrawableContent() const override; 42 bool HasDrawableContent() const override;
46 43
47 private: 44 private:
48 ~SurfaceLayer() override; 45 ~SurfaceLayer() override;
49 void RemoveCurrentReference(); 46 void RemoveCurrentReference();
50 47
51 SurfaceInfo surface_info_; 48 SurfaceInfo surface_info_;
52 scoped_refptr<SurfaceReferenceFactory> ref_factory_; 49 scoped_refptr<SurfaceReferenceFactory> ref_factory_;
53 std::unique_ptr<SurfaceReferenceBase> current_ref_; 50 base::Closure reference_returner_;
54 bool stretch_content_to_fill_bounds_ = false; 51 bool stretch_content_to_fill_bounds_ = false;
55 52
56 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); 53 DISALLOW_COPY_AND_ASSIGN(SurfaceLayer);
57 }; 54 };
58 55
59 } // namespace cc 56 } // namespace cc
60 57
61 #endif // CC_LAYERS_SURFACE_LAYER_H_ 58 #endif // CC_LAYERS_SURFACE_LAYER_H_
OLDNEW
« no previous file with comments | « base/callback_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698