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

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

Issue 2388753003: Introduce cc::LocalFrameId and use in SurfaceFactory (Closed)
Patch Set: Fix exo_unittests Created 4 years, 2 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return last_submitted_frame_size_; 43 return last_submitted_frame_size_;
44 } 44 }
45 45
46 bool may_contain_video() const { return may_contain_video_; } 46 bool may_contain_video() const { return may_contain_video_; }
47 47
48 // mojom::Surface: 48 // mojom::Surface:
49 void SubmitCompositorFrame( 49 void SubmitCompositorFrame(
50 cc::CompositorFrame frame, 50 cc::CompositorFrame frame,
51 const SubmitCompositorFrameCallback& callback) override; 51 const SubmitCompositorFrameCallback& callback) override;
52 52
53 const cc::SurfaceId& id() const { return surface_id_; } 53 const cc::LocalFrameId& local_frame_id() const { return local_frame_id_; }
54
55 cc::SurfaceId GetSurfaceId() const;
54 56
55 // Destroys old surfaces that have been outdated by a new surface. 57 // Destroys old surfaces that have been outdated by a new surface.
56 void DestroySurfacesScheduledForDestruction(); 58 void DestroySurfacesScheduledForDestruction();
57 59
58 private: 60 private:
59 ServerWindow* window(); 61 ServerWindow* window();
60 62
61 // SurfaceFactoryClient implementation. 63 // SurfaceFactoryClient implementation.
62 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 64 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
63 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 65 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
64 66
65 const cc::FrameSinkId frame_sink_id_; 67 const cc::FrameSinkId frame_sink_id_;
66 68
67 ServerWindowSurfaceManager* manager_; // Owns this. 69 ServerWindowSurfaceManager* manager_; // Owns this.
68 70
69 gfx::Size last_submitted_frame_size_; 71 gfx::Size last_submitted_frame_size_;
70 72
71 cc::SurfaceId surface_id_; 73 cc::LocalFrameId local_frame_id_;
72 cc::SurfaceIdAllocator surface_id_allocator_; 74 cc::SurfaceIdAllocator surface_id_allocator_;
73 cc::SurfaceFactory surface_factory_; 75 cc::SurfaceFactory surface_factory_;
74 76
75 mojom::SurfaceClientPtr client_; 77 mojom::SurfaceClientPtr client_;
76 mojo::Binding<Surface> binding_; 78 mojo::Binding<Surface> binding_;
77 79
78 // Set of surface ids that need to be destroyed. 80 // Set of surface ids that need to be destroyed.
79 std::set<cc::SurfaceId> surfaces_scheduled_for_destruction_; 81 std::set<cc::LocalFrameId> surfaces_scheduled_for_destruction_;
80 82
81 bool may_contain_video_ = false; 83 bool may_contain_video_ = false;
82 84
83 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); 85 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface);
84 }; 86 };
85 87
86 } // namespace ws 88 } // namespace ws
87 89
88 } // namespace ui 90 } // namespace ui
89 91
90 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ 92 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698