| Index: services/ui/surfaces/display_compositor.h
|
| diff --git a/services/ui/surfaces/display_compositor.h b/services/ui/surfaces/display_compositor.h
|
| index a59fe9ee158053525f96db1094d87327d8dcf893..2498bac10c0091d389213ee3d34eeb4da6e8319b 100644
|
| --- a/services/ui/surfaces/display_compositor.h
|
| +++ b/services/ui/surfaces/display_compositor.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "cc/surfaces/surface_manager.h"
|
| +#include "cc/surfaces/surface_observer.h"
|
|
|
| namespace cc {
|
| class SurfaceHittest;
|
| @@ -18,26 +19,36 @@ class SurfaceManager;
|
|
|
| namespace ui {
|
|
|
| +class DisplayCompositorClient;
|
| +
|
| // The DisplayCompositor object is an object global to the Window Server app
|
| // that holds the SurfaceServer and allocates new Surfaces namespaces.
|
| // This object lives on the main thread of the Window Server.
|
| // TODO(rjkroege, fsamuel): This object will need to change to support multiple
|
| // displays.
|
| -class DisplayCompositor : public base::RefCounted<DisplayCompositor> {
|
| +class DisplayCompositor : public cc::SurfaceObserver,
|
| + public base::RefCounted<DisplayCompositor> {
|
| public:
|
| - DisplayCompositor();
|
| + explicit DisplayCompositor(DisplayCompositorClient* client);
|
|
|
| uint32_t GenerateNextClientId();
|
|
|
| + void ReturnSurfaceReference(const cc::SurfaceSequence& sequence);
|
| +
|
| cc::SurfaceManager* manager() { return &manager_; }
|
|
|
| private:
|
| friend class base::RefCounted<DisplayCompositor>;
|
| - ~DisplayCompositor();
|
| + virtual ~DisplayCompositor();
|
| +
|
| + // cc::SurfaceObserver implementation.
|
| + void OnSurfaceCreated(const cc::SurfaceId& surface_id,
|
| + const gfx::Size& frame_size,
|
| + float device_scale_factor) override;
|
| + void OnSurfaceDamaged(const cc::SurfaceId& surface_id,
|
| + bool* changed) override;
|
|
|
| - // A Surface ID is an unsigned 64-bit int where the high 32-bits are generated
|
| - // by the Surfaces service, and the low 32-bits are generated by the process
|
| - // that requested the Surface.
|
| + DisplayCompositorClient* const client_;
|
| uint32_t next_client_id_;
|
| cc::SurfaceManager manager_;
|
|
|
|
|