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_SURFACE_REFERENCE_BASE_H_ | |
| 6 #define CC_SURFACES_SURFACE_REFERENCE_BASE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/memory/ptr_util.h" | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "cc/surfaces/surface_sequence.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 | |
| 16 class CompositorFrameMetadata; | |
|
Fady Samuel
2016/12/16 12:24:09
Get rid of this?
Saman Sami
2016/12/16 16:14:35
Done.
| |
| 17 class SurfaceReferenceFactory; | |
| 18 | |
| 19 // The base class for the references returned by SurfaceReferenceFactory and | |
| 20 // its subclasses. | |
| 21 // The objects of this class hold on to their corresponding surface reference | |
| 22 // until destroy is called. | |
|
Fady Samuel
2016/12/16 12:24:09
nit: Destroy
Saman Sami
2016/12/16 16:14:35
Done.
| |
| 23 // To keep things as lightweight as possible, the base class only keeps a | |
| 24 // pointer to the factory and it's up to the subclasses to decide what other | |
| 25 // information they need to keep. | |
| 26 class SurfaceReferenceBase { | |
| 27 public: | |
| 28 explicit SurfaceReferenceBase( | |
| 29 scoped_refptr<const SurfaceReferenceFactory> factory); | |
| 30 virtual ~SurfaceReferenceBase(); | |
| 31 | |
| 32 void Destroy(); | |
| 33 | |
| 34 // TODO(fsamuel, samans, kylechar): Remove this. | |
| 35 void Destroy(CompositorFrameMetadata* metadata); | |
|
Fady Samuel
2016/12/16 12:24:09
I think you can get rid of this now?
Saman Sami
2016/12/16 16:14:35
Done.
| |
| 36 | |
| 37 private: | |
| 38 scoped_refptr<const SurfaceReferenceFactory> factory_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(SurfaceReferenceBase); | |
| 41 }; | |
| 42 | |
| 43 } // namespace cc | |
| 44 | |
| 45 #endif // CC_SURFACES_SURFACE_REFERENCE_BASE_H_ | |
| OLD | NEW |