Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: components/mus/ws/server_window_surface.cc

Issue 2014233002: Implement cc::SurfaceId StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 bool ServerWindowSurface::ConvertSurfaceDrawQuad( 105 bool ServerWindowSurface::ConvertSurfaceDrawQuad(
106 const mojom::QuadPtr& input, 106 const mojom::QuadPtr& input,
107 const mojom::CompositorFrameMetadataPtr& metadata, 107 const mojom::CompositorFrameMetadataPtr& metadata,
108 cc::SharedQuadState* sqs, 108 cc::SharedQuadState* sqs,
109 cc::RenderPass* render_pass) { 109 cc::RenderPass* render_pass) {
110 // Surface ids originate from the client, meaning they are ClientWindowIds 110 // Surface ids originate from the client, meaning they are ClientWindowIds
111 // and can only be resolved by the client that submitted the frame. 111 // and can only be resolved by the client that submitted the frame.
112 const ClientWindowId other_client_window_id( 112 const ClientWindowId other_client_window_id(
113 input->surface_quad_state->surface->local_id); 113 input->surface_quad_state->surface.local_id());
114 ServerWindow* other_window = window()->delegate()->FindWindowForSurface( 114 ServerWindow* other_window = window()->delegate()->FindWindowForSurface(
115 window(), mojom::SurfaceType::DEFAULT, other_client_window_id); 115 window(), mojom::SurfaceType::DEFAULT, other_client_window_id);
116 if (!other_window) { 116 if (!other_window) {
117 DVLOG(2) << "The window ID '" << other_client_window_id.id 117 DVLOG(2) << "The window ID '" << other_client_window_id.id
118 << "' does not exist."; 118 << "' does not exist.";
119 // TODO(fsamuel): We return true here so that the CompositorFrame isn't 119 // TODO(fsamuel): We return true here so that the CompositorFrame isn't
120 // entirely rejected. We just drop this SurfaceDrawQuad. This failure 120 // entirely rejected. We just drop this SurfaceDrawQuad. This failure
121 // can happen if the client has an out of date view of the window tree. 121 // can happen if the client has an out of date view of the window tree.
122 // It would be nice if we can avoid reaching this state in the future. 122 // It would be nice if we can avoid reaching this state in the future.
123 return true; 123 return true;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 mojo::Array<mojom::ReturnedResourcePtr>::From(resources)); 160 mojo::Array<mojom::ReturnedResourcePtr>::From(resources));
161 } 161 }
162 162
163 void ServerWindowSurface::SetBeginFrameSource( 163 void ServerWindowSurface::SetBeginFrameSource(
164 cc::BeginFrameSource* begin_frame_source) { 164 cc::BeginFrameSource* begin_frame_source) {
165 // TODO(tansell): Implement this. 165 // TODO(tansell): Implement this.
166 } 166 }
167 167
168 } // namespace ws 168 } // namespace ws
169 } // namespace mus 169 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698