Chromium Code Reviews| Index: services/ui/surfaces/display_compositor.h |
| diff --git a/services/ui/surfaces/display_compositor.h b/services/ui/surfaces/display_compositor.h |
| index 94fa3f8f9078af8a30e79f4a207b5b48c3b70649..cec4a5f2115a6c482d4cd3a1043b1d2fc2f2aba7 100644 |
| --- a/services/ui/surfaces/display_compositor.h |
| +++ b/services/ui/surfaces/display_compositor.h |
| @@ -7,6 +7,9 @@ |
| #include <stdint.h> |
| +#include <unordered_map> |
| +#include <vector> |
| + |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #include "cc/ipc/display_compositor.mojom.h" |
| @@ -22,8 +25,9 @@ class SurfaceManager; |
| } // namespace cc |
| namespace ui { |
| - |
| -class DisplayCompositorClient; |
| +namespace test { |
| +class DisplayCompositorTest; |
| +} |
| // The DisplayCompositor object is an object global to the Window Server app |
| // that holds the SurfaceServer and allocates new Surfaces namespaces. |
| @@ -45,8 +49,15 @@ class DisplayCompositor : public cc::SurfaceObserver, |
| cc::SurfaceManager* manager() { return &manager_; } |
| + void set_reference_manager_for_testing( |
| + cc::SurfaceReferenceManager* reference_manager) { |
| + reference_manager_ = reference_manager; |
| + } |
| + |
| private: |
| friend class base::RefCounted<DisplayCompositor>; |
| + friend class test::DisplayCompositorTest; |
| + |
| virtual ~DisplayCompositor(); |
| // cc::SurfaceObserver implementation. |
| @@ -58,6 +69,10 @@ class DisplayCompositor : public cc::SurfaceObserver, |
| cc::mojom::DisplayCompositorClientPtr client_; |
| cc::SurfaceManager manager_; |
| + cc::SurfaceReferenceManager* reference_manager_; |
|
Fady Samuel
2016/11/18 20:18:24
Can we avoid having two references to the same thi
kylechar
2016/11/24 20:43:14
Not easily, at least from what I can think of. We
|
| + |
| + // Local copy of top level root surface id, for convenience. |
| + const cc::SurfaceId root_surface_id_; |
| // SurfaceIds that have temporary references from top level root so they |
| // aren't GC'd before DisplayCompositorClient can add a real reference. This |