| 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 COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ | 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ |
| 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ | 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/surfaces/surface_factory.h" | 9 #include "cc/surfaces/surface_factory.h" |
| 10 #include "cc/surfaces/surface_factory_client.h" | 10 #include "cc/surfaces/surface_factory_client.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const mojom::CompositorFramePtr& input); | 58 const mojom::CompositorFramePtr& input); |
| 59 | 59 |
| 60 // Overriden from CustomSurfaceConverter: | 60 // Overriden from CustomSurfaceConverter: |
| 61 bool ConvertSurfaceDrawQuad(const mojom::QuadPtr& input, | 61 bool ConvertSurfaceDrawQuad(const mojom::QuadPtr& input, |
| 62 const mojom::CompositorFrameMetadataPtr& metadata, | 62 const mojom::CompositorFrameMetadataPtr& metadata, |
| 63 cc::SharedQuadState* sqs, | 63 cc::SharedQuadState* sqs, |
| 64 cc::RenderPass* render_pass) override; | 64 cc::RenderPass* render_pass) override; |
| 65 | 65 |
| 66 // SurfaceFactoryClient implementation. | 66 // SurfaceFactoryClient implementation. |
| 67 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 67 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 68 void SetBeginFrameSource(cc::SurfaceId surface_id, |
| 69 cc::BeginFrameSource* begin_frame_source) override; |
| 68 | 70 |
| 69 // |window_| owns |this|. | 71 // |window_| owns |this|. |
| 70 ServerWindow* const window_; | 72 ServerWindow* const window_; |
| 71 | 73 |
| 72 // The set of Windows referenced in the last submitted CompositorFrame. | 74 // The set of Windows referenced in the last submitted CompositorFrame. |
| 73 std::set<WindowId> referenced_window_ids_; | 75 std::set<WindowId> referenced_window_ids_; |
| 74 gfx::Size last_submitted_frame_size_; | 76 gfx::Size last_submitted_frame_size_; |
| 75 | 77 |
| 76 cc::SurfaceId surface_id_; | 78 cc::SurfaceId surface_id_; |
| 77 // TODO(fsamuel): As an optimization, we may want to move SurfaceIdAllocator | 79 // TODO(fsamuel): As an optimization, we may want to move SurfaceIdAllocator |
| 78 // and SurfaceFactory to a separate class so that we don't keep destroying | 80 // and SurfaceFactory to a separate class so that we don't keep destroying |
| 79 // them and creating new ones on navigation. | 81 // them and creating new ones on navigation. |
| 80 cc::SurfaceIdAllocator surface_id_allocator_; | 82 cc::SurfaceIdAllocator surface_id_allocator_; |
| 81 cc::SurfaceFactory surface_factory_; | 83 cc::SurfaceFactory surface_factory_; |
| 82 | 84 |
| 83 mojom::SurfaceClientPtr client_; | 85 mojom::SurfaceClientPtr client_; |
| 84 mojo::Binding<Surface> binding_; | 86 mojo::Binding<Surface> binding_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); | 88 DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace ws | 91 } // namespace ws |
| 90 | 92 |
| 91 } // namespace mus | 93 } // namespace mus |
| 92 | 94 |
| 93 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ | 95 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_SURFACE_H_ |
| OLD | NEW |