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

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

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 years, 10 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/display_manager_delegate.h ('k') | components/mus/ws/window_finder.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/surfaces/surfaces_state.h" 10 #include "components/mus/surfaces/surfaces_state.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « components/mus/ws/display_manager_delegate.h ('k') | components/mus/ws/window_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698