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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Surface ids originate from the client, meaning they are ClientWindowIds | 102 // Surface ids originate from the client, meaning they are ClientWindowIds |
103 // and can only be resolved by the client that submitted the frame. | 103 // and can only be resolved by the client that submitted the frame. |
104 const ClientWindowId other_client_window_id( | 104 const ClientWindowId other_client_window_id( |
105 input->surface_quad_state->surface.To<cc::SurfaceId>().id); | 105 input->surface_quad_state->surface.To<cc::SurfaceId>().GetUnsafeValue()); |
106 ServerWindow* other_window = window()->delegate()->FindWindowForSurface( | 106 ServerWindow* other_window = window()->delegate()->FindWindowForSurface( |
107 window(), mojom::SurfaceType::DEFAULT, other_client_window_id); | 107 window(), mojom::SurfaceType::DEFAULT, other_client_window_id); |
108 if (!other_window) { | 108 if (!other_window) { |
109 DVLOG(2) << "The window ID '" << other_client_window_id.id | 109 DVLOG(2) << "The window ID '" << other_client_window_id.id |
110 << "' does not exist."; | 110 << "' does not exist."; |
111 // TODO(fsamuel): We return true here so that the CompositorFrame isn't | 111 // TODO(fsamuel): We return true here so that the CompositorFrame isn't |
112 // entirely rejected. We just drop this SurfaceDrawQuad. This failure | 112 // entirely rejected. We just drop this SurfaceDrawQuad. This failure |
113 // can happen if the client has an out of date view of the window tree. | 113 // can happen if the client has an out of date view of the window tree. |
114 // It would be nice if we can avoid reaching this state in the future. | 114 // It would be nice if we can avoid reaching this state in the future. |
115 return true; | 115 return true; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 | 154 |
155 void ServerWindowSurface::SetBeginFrameSource( | 155 void ServerWindowSurface::SetBeginFrameSource( |
156 cc::SurfaceId surface_id, | 156 cc::SurfaceId surface_id, |
157 cc::BeginFrameSource* begin_frame_source) { | 157 cc::BeginFrameSource* begin_frame_source) { |
158 // TODO(tansell): Implement this. | 158 // TODO(tansell): Implement this. |
159 } | 159 } |
160 | 160 |
161 } // namespace ws | 161 } // namespace ws |
162 } // namespace mus | 162 } // namespace mus |
OLD | NEW |