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

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

Issue 2514033002: Introducing SurfaceReferenceFactory (Closed)
Patch Set: c Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_SURFACES_DIRECT_SURFACE_REFERENCE_FACTORY_H_
6 #define CC_SURFACES_DIRECT_SURFACE_REFERENCE_FACTORY_H_
7
8 #include "cc/surfaces/sequence_surface_reference_factory.h"
9 #include "cc/surfaces/surface_id.h"
10 #include "cc/surfaces/surface_manager.h"
11 #include "cc/surfaces/surface_sequence.h"
12
13 namespace cc {
14
15 class SurfaceManager;
16
17 // The surface reference factory that interacts directly with SurfaceManager.
18 // You probably don't need to instantiate this class directly.
19 // Use SurfaceManager::reference_factory() instead.
20 class CC_SURFACES_EXPORT DirectSurfaceReferenceFactory final
21 : public SequenceSurfaceReferenceFactory {
22 public:
23 explicit DirectSurfaceReferenceFactory(SurfaceManager* manager)
24 : manager_(manager) {}
Fady Samuel 2016/12/14 20:11:39 nit: move to cc file.
Saman Sami 2016/12/14 20:47:52 Done.
25
26 private:
27 ~DirectSurfaceReferenceFactory() override = default;
28
29 // SequenceSurfaceReferenceFactory implementation:
30 void SatisfySequence(const SurfaceSequence& sequence) const override;
31 void RequireSequence(const SurfaceId& surface_id,
32 const SurfaceSequence& sequence) const override;
33
34 SurfaceManager* manager_ = nullptr;
Fady Samuel 2016/12/14 20:11:39 no reason to do this if you're always initializing
Saman Sami 2016/12/14 20:47:52 Done.
35
36 DISALLOW_COPY_AND_ASSIGN(DirectSurfaceReferenceFactory);
37 };
38
39 } // namespace cc
40
41 #endif // CC_SURFACES_DIRECT_SURFACE_REFERENCE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698