| 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 #include "components/mus/ws/server_window_surface.h" | 5 #include "components/mus/ws/server_window_surface.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/quads/shared_quad_state.h" | 8 #include "cc/quads/shared_quad_state.h" |
| 9 #include "cc/quads/surface_draw_quad.h" | 9 #include "cc/quads/surface_draw_quad.h" |
| 10 #include "components/mus/surfaces/surfaces_state.h" | 10 #include "components/mus/surfaces/surfaces_state.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 DCHECK(!registered_surface_factory_client_); | 90 DCHECK(!registered_surface_factory_client_); |
| 91 registered_surface_factory_client_ = true; | 91 registered_surface_factory_client_ = true; |
| 92 cc::SurfaceManager* surface_manager = manager_->GetSurfaceManager(); | 92 cc::SurfaceManager* surface_manager = manager_->GetSurfaceManager(); |
| 93 surface_manager->RegisterSurfaceFactoryClient(manager_->id_namespace(), this); | 93 surface_manager->RegisterSurfaceFactoryClient(manager_->id_namespace(), this); |
| 94 } | 94 } |
| 95 | 95 |
| 96 ServerWindow* ServerWindowSurface::window() { | 96 ServerWindow* ServerWindowSurface::window() { |
| 97 return manager_->window(); | 97 return manager_->window(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 scoped_ptr<cc::CompositorFrame> ServerWindowSurface::ConvertCompositorFrame( | 100 std::unique_ptr<cc::CompositorFrame> |
| 101 ServerWindowSurface::ConvertCompositorFrame( |
| 101 const mojom::CompositorFramePtr& input) { | 102 const mojom::CompositorFramePtr& input) { |
| 102 referenced_window_ids_.clear(); | 103 referenced_window_ids_.clear(); |
| 103 return ConvertToCompositorFrame(input, this); | 104 return ConvertToCompositorFrame(input, this); |
| 104 } | 105 } |
| 105 | 106 |
| 106 bool ServerWindowSurface::ConvertSurfaceDrawQuad( | 107 bool ServerWindowSurface::ConvertSurfaceDrawQuad( |
| 107 const mojom::QuadPtr& input, | 108 const mojom::QuadPtr& input, |
| 108 const mojom::CompositorFrameMetadataPtr& metadata, | 109 const mojom::CompositorFrameMetadataPtr& metadata, |
| 109 cc::SharedQuadState* sqs, | 110 cc::SharedQuadState* sqs, |
| 110 cc::RenderPass* render_pass) { | 111 cc::RenderPass* render_pass) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 mojo::Array<mojom::ReturnedResourcePtr>::From(resources)); | 162 mojo::Array<mojom::ReturnedResourcePtr>::From(resources)); |
| 162 } | 163 } |
| 163 | 164 |
| 164 void ServerWindowSurface::SetBeginFrameSource( | 165 void ServerWindowSurface::SetBeginFrameSource( |
| 165 cc::BeginFrameSource* begin_frame_source) { | 166 cc::BeginFrameSource* begin_frame_source) { |
| 166 // TODO(tansell): Implement this. | 167 // TODO(tansell): Implement this. |
| 167 } | 168 } |
| 168 | 169 |
| 169 } // namespace ws | 170 } // namespace ws |
| 170 } // namespace mus | 171 } // namespace mus |
| OLD | NEW |