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

Side by Side Diff: services/ui/surfaces/display_compositor.h

Issue 2470143006: Remove dependency on SurfaceManager in FrameGenerator (Closed)
Patch Set: Remove a couple of bad std::moves Created 4 years, 1 month 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
« no previous file with comments | « no previous file | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 // The DisplayCompositor object is an object global to the Window Server app 25 // The DisplayCompositor object is an object global to the Window Server app
26 // that holds the SurfaceServer and allocates new Surfaces namespaces. 26 // that holds the SurfaceServer and allocates new Surfaces namespaces.
27 // This object lives on the main thread of the Window Server. 27 // This object lives on the main thread of the Window Server.
28 // TODO(rjkroege, fsamuel): This object will need to change to support multiple 28 // TODO(rjkroege, fsamuel): This object will need to change to support multiple
29 // displays. 29 // displays.
30 class DisplayCompositor : public cc::SurfaceObserver, 30 class DisplayCompositor : public cc::SurfaceObserver,
31 public base::RefCounted<DisplayCompositor> { 31 public base::RefCounted<DisplayCompositor> {
32 public: 32 public:
33 explicit DisplayCompositor(cc::mojom::DisplayCompositorClientPtr client); 33 explicit DisplayCompositor(cc::mojom::DisplayCompositorClientPtr client);
34 34
35 void ReturnSurfaceReference(const cc::SurfaceSequence& sequence); 35 // TODO(fsamuel): These methods should be behind a mojo interface.
36 void AddSurfaceReference(const cc::SurfaceId& surface_id,
37 const cc::SurfaceSequence& surface_sequence);
38 void ReturnSurfaceReferences(const cc::FrameSinkId& frame_sink_id,
39 const std::vector<uint32_t>& sequences);
36 40
37 cc::SurfaceManager* manager() { return &manager_; } 41 cc::SurfaceManager* manager() { return &manager_; }
38 42
39 private: 43 private:
40 friend class base::RefCounted<DisplayCompositor>; 44 friend class base::RefCounted<DisplayCompositor>;
41 virtual ~DisplayCompositor(); 45 virtual ~DisplayCompositor();
42 46
43 // cc::SurfaceObserver implementation. 47 // cc::SurfaceObserver implementation.
44 void OnSurfaceCreated(const cc::SurfaceId& surface_id, 48 void OnSurfaceCreated(const cc::SurfaceId& surface_id,
45 const gfx::Size& frame_size, 49 const gfx::Size& frame_size,
46 float device_scale_factor) override; 50 float device_scale_factor) override;
47 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, 51 void OnSurfaceDamaged(const cc::SurfaceId& surface_id,
48 bool* changed) override; 52 bool* changed) override;
49 53
50 cc::mojom::DisplayCompositorClientPtr client_; 54 cc::mojom::DisplayCompositorClientPtr client_;
51 cc::SurfaceManager manager_; 55 cc::SurfaceManager manager_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); 57 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor);
54 }; 58 };
55 59
56 } // namespace ui 60 } // namespace ui
57 61
58 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ 62 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698