Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |