| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return ConvertToCompositorFrame(input, this); | 94 return ConvertToCompositorFrame(input, this); |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool ServerWindowSurface::ConvertSurfaceDrawQuad( | 97 bool ServerWindowSurface::ConvertSurfaceDrawQuad( |
| 98 const mojom::QuadPtr& input, | 98 const mojom::QuadPtr& input, |
| 99 const mojom::CompositorFrameMetadataPtr& metadata, | 99 const mojom::CompositorFrameMetadataPtr& metadata, |
| 100 cc::SharedQuadState* sqs, | 100 cc::SharedQuadState* sqs, |
| 101 cc::RenderPass* render_pass) { | 101 cc::RenderPass* render_pass) { |
| 102 Id id = static_cast<Id>( | 102 Id id = static_cast<Id>( |
| 103 input->surface_quad_state->surface.To<cc::SurfaceId>().id); | 103 input->surface_quad_state->surface.To<cc::SurfaceId>().id); |
| 104 // TODO(sky): this is now wrong, needs mapping from client to window. |
| 104 WindowId other_window_id = WindowIdFromTransportId(id); | 105 WindowId other_window_id = WindowIdFromTransportId(id); |
| 105 ServerWindow* other_window = window()->GetChildWindow(other_window_id); | 106 ServerWindow* other_window = window()->GetChildWindow(other_window_id); |
| 106 if (!other_window) { | 107 if (!other_window) { |
| 107 DVLOG(2) << "The window ID '" << id << "' does not exist."; | 108 DVLOG(2) << "The window ID '" << id << "' does not exist."; |
| 108 // TODO(fsamuel): We return true here so that the CompositorFrame isn't | 109 // TODO(fsamuel): We return true here so that the CompositorFrame isn't |
| 109 // entirely rejected. We just drop this SurfaceDrawQuad. This failure | 110 // entirely rejected. We just drop this SurfaceDrawQuad. This failure |
| 110 // can happen if the client has an out of date view of the window tree. | 111 // can happen if the client has an out of date view of the window tree. |
| 111 // It would be nice if we can avoid reaching this state in the future. | 112 // It would be nice if we can avoid reaching this state in the future. |
| 112 return true; | 113 return true; |
| 113 } | 114 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 151 } |
| 151 | 152 |
| 152 void ServerWindowSurface::SetBeginFrameSource( | 153 void ServerWindowSurface::SetBeginFrameSource( |
| 153 cc::SurfaceId surface_id, | 154 cc::SurfaceId surface_id, |
| 154 cc::BeginFrameSource* begin_frame_source) { | 155 cc::BeginFrameSource* begin_frame_source) { |
| 155 // TODO(tansell): Implement this. | 156 // TODO(tansell): Implement this. |
| 156 } | 157 } |
| 157 | 158 |
| 158 } // namespace ws | 159 } // namespace ws |
| 159 } // namespace mus | 160 } // namespace mus |
| OLD | NEW |