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

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: Created 5 years 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 referenced_window_ids_.clear(); 94 referenced_window_ids_.clear();
95 return ConvertToCompositorFrame(input, this); 95 return ConvertToCompositorFrame(input, this);
96 } 96 }
97 97
98 bool ServerWindowSurface::ConvertSurfaceDrawQuad( 98 bool ServerWindowSurface::ConvertSurfaceDrawQuad(
99 const mojom::QuadPtr& input, 99 const mojom::QuadPtr& input,
100 const mojom::CompositorFrameMetadataPtr& metadata, 100 const mojom::CompositorFrameMetadataPtr& metadata,
101 cc::SharedQuadState* sqs, 101 cc::SharedQuadState* sqs,
102 cc::RenderPass* render_pass) { 102 cc::RenderPass* render_pass) {
103 Id id = static_cast<Id>( 103 Id id = static_cast<Id>(
104 input->surface_quad_state->surface.To<cc::SurfaceId>().id); 104 input->surface_quad_state->surface.To<cc::SurfaceId>().GetUnsafeValue());
105 WindowId other_window_id = WindowIdFromTransportId(id); 105 WindowId other_window_id = WindowIdFromTransportId(id);
106 ServerWindow* other_window = window()->GetChildWindow(other_window_id); 106 ServerWindow* other_window = window()->GetChildWindow(other_window_id);
107 if (!other_window) { 107 if (!other_window) {
108 DVLOG(2) << "The window ID '" << id << "' does not exist."; 108 DVLOG(2) << "The window ID '" << id << "' does not exist.";
109 // 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
110 // entirely rejected. We just drop this SurfaceDrawQuad. This failure 110 // entirely rejected. We just drop this SurfaceDrawQuad. This failure
111 // 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.
112 // 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.
113 return true; 113 return true;
114 } 114 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void ServerWindowSurface::SetBeginFrameSource( 153 void ServerWindowSurface::SetBeginFrameSource(
154 cc::SurfaceId surface_id, 154 cc::SurfaceId surface_id,
155 cc::BeginFrameSource* begin_frame_source) { 155 cc::BeginFrameSource* begin_frame_source) {
156 // TODO(tansell): Implement this. 156 // TODO(tansell): Implement this.
157 } 157 }
158 158
159 } // namespace ws 159 } // namespace ws
160 } // namespace mus 160 } // 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