| 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/public/cpp/surfaces/surfaces_type_converters.h" | 10 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 std::unique_ptr<cc::CompositorFrame> | 97 std::unique_ptr<cc::CompositorFrame> |
| 98 ServerWindowSurface::ConvertCompositorFrame( | 98 ServerWindowSurface::ConvertCompositorFrame( |
| 99 const mojom::CompositorFramePtr& input) { | 99 const mojom::CompositorFramePtr& input) { |
| 100 referenced_window_ids_.clear(); | 100 referenced_window_ids_.clear(); |
| 101 return ConvertToCompositorFrame(input, this); | 101 return ConvertToCompositorFrame(input, this); |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool ServerWindowSurface::ConvertSurfaceDrawQuad( | 104 bool ServerWindowSurface::ConvertSurfaceDrawQuad( |
| 105 const mojom::QuadPtr& input, | 105 const cc::mojom::DrawQuadPtr& input, |
| 106 const cc::CompositorFrameMetadata& metadata, | 106 const cc::CompositorFrameMetadata& metadata, |
| 107 cc::SharedQuadState* sqs, | 107 cc::SharedQuadState* sqs, |
| 108 cc::RenderPass* render_pass) { | 108 cc::RenderPass* render_pass) { |
| 109 // Surface ids originate from the client, meaning they are ClientWindowIds | 109 // Surface ids originate from the client, meaning they are ClientWindowIds |
| 110 // and can only be resolved by the client that submitted the frame. | 110 // and can only be resolved by the client that submitted the frame. |
| 111 const ClientWindowId other_client_window_id( | 111 const ClientWindowId other_client_window_id( |
| 112 input->surface_quad_state->surface.local_id()); | 112 input->surface_quad_state->surface.local_id()); |
| 113 ServerWindow* other_window = window()->delegate()->FindWindowForSurface( | 113 ServerWindow* other_window = window()->delegate()->FindWindowForSurface( |
| 114 window(), mojom::SurfaceType::DEFAULT, other_client_window_id); | 114 window(), mojom::SurfaceType::DEFAULT, other_client_window_id); |
| 115 if (!other_window) { | 115 if (!other_window) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); | 156 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void ServerWindowSurface::SetBeginFrameSource( | 159 void ServerWindowSurface::SetBeginFrameSource( |
| 160 cc::BeginFrameSource* begin_frame_source) { | 160 cc::BeginFrameSource* begin_frame_source) { |
| 161 // TODO(tansell): Implement this. | 161 // TODO(tansell): Implement this. |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace ws | 164 } // namespace ws |
| 165 } // namespace mus | 165 } // namespace mus |
| OLD | NEW |