Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } | |
|
rjkroege
2016/10/07 19:34:50
would be awesome to remind people what a FrameSink
Fady Samuel
2016/10/07 20:31:33
Done.
| |
| 53 const cc::LocalFrameId& local_frame_id() const { return local_frame_id_; } | 54 const cc::LocalFrameId& local_frame_id() const { return local_frame_id_; } |
| 54 | 55 |
| 56 bool has_frame() const { return !local_frame_id_.is_null(); } | |
| 57 | |
| 55 cc::SurfaceId GetSurfaceId() const; | 58 cc::SurfaceId GetSurfaceId() const; |
| 56 | 59 |
| 57 // Destroys old surfaces that have been outdated by a new surface. | 60 ServerWindow* window(); |
|
rjkroege
2016/10/07 19:34:50
if I remember correctly, we need windows that don'
Fady Samuel
2016/10/07 20:31:33
A surface has a window but a window may not have a
rjkroege
2016/10/07 20:48:13
was an off-topic comment. sorry
Fady Samuel
2016/10/07 21:04:33
Acknowledged.
| |
| 58 void DestroySurfacesScheduledForDestruction(); | |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 ServerWindow* window(); | |
| 62 | 63 |
| 63 // SurfaceFactoryClient implementation. | 64 // SurfaceFactoryClient implementation. |
| 64 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 65 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 65 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | 66 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; |
| 66 | 67 |
| 67 const cc::FrameSinkId frame_sink_id_; | 68 const cc::FrameSinkId frame_sink_id_; |
| 68 | 69 |
| 69 ServerWindowSurfaceManager* manager_; // Owns this. | 70 ServerWindowSurfaceManager* manager_; // Owns this. |
| 70 | 71 |
| 71 gfx::Size last_submitted_frame_size_; | 72 gfx::Size last_submitted_frame_size_; |
| 72 | 73 |
| 73 cc::LocalFrameId local_frame_id_; | 74 cc::LocalFrameId local_frame_id_; |
| 74 cc::SurfaceIdAllocator surface_id_allocator_; | 75 cc::SurfaceIdAllocator surface_id_allocator_; |
| 75 cc::SurfaceFactory surface_factory_; | 76 cc::SurfaceFactory surface_factory_; |
| 76 | 77 |
| 77 mojom::SurfaceClientPtr client_; | 78 mojom::SurfaceClientPtr client_; |
| 78 mojo::Binding<Surface> binding_; | 79 mojo::Binding<Surface> binding_; |
| 79 | 80 |
| 80 // Set of surface ids that need to be destroyed. | |
| 81 std::set<cc::LocalFrameId> surfaces_scheduled_for_destruction_; | |
| 82 | |
| 83 bool may_contain_video_ = false; | 81 bool may_contain_video_ = false; |
| 84 | 82 |
| 85 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); | 83 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace ws | 86 } // namespace ws |
| 89 | 87 |
| 90 } // namespace ui | 88 } // namespace ui |
| 91 | 89 |
| 92 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ | 90 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_H_ |
| OLD | NEW |