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

Side by Side Diff: services/ui/ws/server_window_surface.h

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 months 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 | « services/ui/surfaces/display_compositor.cc ('k') | services/ui/ws/server_window_surface.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_WS_SERVER_WINDOW_SURFACE_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // mojom::Surface: 44 // mojom::Surface:
45 void SubmitCompositorFrame( 45 void SubmitCompositorFrame(
46 cc::CompositorFrame frame, 46 cc::CompositorFrame frame,
47 const SubmitCompositorFrameCallback& callback) override; 47 const SubmitCompositorFrameCallback& callback) override;
48 48
49 const cc::SurfaceId& id() const { return surface_id_; } 49 const cc::SurfaceId& id() const { return surface_id_; }
50 50
51 // Destroys old surfaces that have been outdated by a new surface. 51 // Destroys old surfaces that have been outdated by a new surface.
52 void DestroySurfacesScheduledForDestruction(); 52 void DestroySurfacesScheduledForDestruction();
53 53
54 // Registers this with the SurfaceManager
55 void RegisterForBeginFrames();
56
57 private: 54 private:
58 ServerWindow* window(); 55 ServerWindow* window();
59 56
60 // SurfaceFactoryClient implementation. 57 // SurfaceFactoryClient implementation.
61 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 58 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
62 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 59 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
63 60
64 ServerWindowSurfaceManager* manager_; // Owns this. 61 ServerWindowSurfaceManager* manager_; // Owns this.
65 62
66 gfx::Size last_submitted_frame_size_; 63 gfx::Size last_submitted_frame_size_;
67 64
68 cc::SurfaceId surface_id_; 65 cc::SurfaceId surface_id_;
69 cc::SurfaceFactory surface_factory_; 66 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
70 67
71 mojom::SurfaceClientPtr client_; 68 mojom::SurfaceClientPtr client_;
72 mojo::Binding<Surface> binding_; 69 mojo::Binding<Surface> binding_;
73 70
74 // Set of surface ids that need to be destroyed. 71 // Set of surface ids that need to be destroyed.
75 std::set<cc::SurfaceId> surfaces_scheduled_for_destruction_; 72 std::set<cc::SurfaceId> surfaces_scheduled_for_destruction_;
76 73
77 bool registered_surface_factory_client_;
78
79 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); 74 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface);
80 }; 75 };
81 76
82 } // namespace ws 77 } // namespace ws
83 78
84 } // namespace ui 79 } // namespace ui
85 80
86 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 81 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | services/ui/ws/server_window_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698