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

Side by Side Diff: cc/surfaces/sequence_surface_reference_factory.h

Issue 2616403003: Replacing SurfaceReferenceBase and SequenceSurfaceReference with Closures (Closed)
Patch Set: build 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_ 5 #ifndef CC_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_
6 #define CC_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_ 6 #define CC_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_
7 7
8 #include "cc/output/compositor_frame_metadata.h" 8 #include "cc/surfaces/scoped_surface_reference_base.h"
9 #include "cc/surfaces/surface_reference_base.h"
10 #include "cc/surfaces/surface_reference_factory.h" 9 #include "cc/surfaces/surface_reference_factory.h"
11 #include "cc/surfaces/surfaces_export.h" 10 #include "cc/surfaces/surfaces_export.h"
12 11
13 namespace cc { 12 namespace cc {
14 13
15 // A surface reference factory that generates references which internally 14 // A surface reference factory that generates references which internally
16 // use SurfaceSequence. 15 // use SurfaceSequence.
17 class CC_SURFACES_EXPORT SequenceSurfaceReferenceFactory 16 class CC_SURFACES_EXPORT SequenceSurfaceReferenceFactory
18 : public NON_EXPORTED_BASE(SurfaceReferenceFactory) { 17 : public NON_EXPORTED_BASE(SurfaceReferenceFactory) {
19 public: 18 public:
20 SequenceSurfaceReferenceFactory() = default; 19 SequenceSurfaceReferenceFactory() = default;
21 20
22 std::unique_ptr<SurfaceReferenceBase> CreateReference( 21 std::unique_ptr<ScopedSurfaceReferenceBase> CreateReference(
23 SurfaceReferenceOwner* owner, 22 SurfaceReferenceOwner* owner,
24 const SurfaceId& surface_id) const override; 23 const SurfaceId& surface_id) const override;
25 24
26 protected: 25 protected:
27 ~SequenceSurfaceReferenceFactory() override = default; 26 ~SequenceSurfaceReferenceFactory() override = default;
28 27
29 private: 28 private:
30 virtual void RequireSequence(const SurfaceId& surface_id, 29 virtual void RequireSequence(const SurfaceId& surface_id,
31 const SurfaceSequence& sequence) const = 0; 30 const SurfaceSequence& sequence) const = 0;
32 virtual void SatisfySequence(const SurfaceSequence& sequence) const = 0; 31 virtual void SatisfySequence(const SurfaceSequence& sequence) const = 0;
33 32
34 // SurfaceReferenceFactory implementation: 33 // SurfaceReferenceFactory implementation:
35 void DestroyReference(SurfaceReferenceBase* surface_ref) const override; 34 void DestroyReference(ScopedSurfaceReferenceBase* surface_ref) const override;
36 35
37 DISALLOW_COPY_AND_ASSIGN(SequenceSurfaceReferenceFactory); 36 DISALLOW_COPY_AND_ASSIGN(SequenceSurfaceReferenceFactory);
38 }; 37 };
39 38
40 } // namespace cc 39 } // namespace cc
41 40
42 #endif // CC_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_ 41 #endif // CC_SURFACES_SEQUENCE_SURFACE_REFERENCE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698