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

Unified Diff: components/mus/ws/server_window_surface.cc

Issue 2065573003: Mus: Delete unused Mandoline Surfaces code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mus_ws_unittests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/server_window_surface.h ('k') | components/mus/ws/test_server_window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/server_window_surface.cc
diff --git a/components/mus/ws/server_window_surface.cc b/components/mus/ws/server_window_surface.cc
index c0d706ef2d876a3938da55427c9c86561838db57..97542d53c96b7ad8f824c28a821f0520e87a01f0 100644
--- a/components/mus/ws/server_window_surface.cc
+++ b/components/mus/ws/server_window_surface.cc
@@ -70,7 +70,7 @@ void ServerWindowSurface::SubmitCompositorFrame(
}
}
surface_factory_.SubmitCompositorFrame(surface_id_,
- ConvertCompositorFrame(frame),
+ ConvertToCompositorFrame(frame),
base::Bind(&CallCallback, callback));
last_submitted_frame_size_ = frame_size;
window()->delegate()->OnScheduleWindowPaint(window());
@@ -94,61 +94,6 @@ ServerWindow* ServerWindowSurface::window() {
return manager_->window();
}
-std::unique_ptr<cc::CompositorFrame>
-ServerWindowSurface::ConvertCompositorFrame(
- const mojom::CompositorFramePtr& input) {
- referenced_window_ids_.clear();
- return ConvertToCompositorFrame(input, this);
-}
-
-bool ServerWindowSurface::ConvertSurfaceDrawQuad(
- const cc::mojom::DrawQuadPtr& input,
- const cc::CompositorFrameMetadata& metadata,
- cc::SharedQuadState* sqs,
- cc::RenderPass* render_pass) {
- // Surface ids originate from the client, meaning they are ClientWindowIds
- // and can only be resolved by the client that submitted the frame.
- const ClientWindowId other_client_window_id(
- input->surface_quad_state->surface.local_id());
- ServerWindow* other_window = window()->delegate()->FindWindowForSurface(
- window(), mojom::SurfaceType::DEFAULT, other_client_window_id);
- if (!other_window) {
- DVLOG(2) << "The window ID '" << other_client_window_id.id
- << "' does not exist.";
- // TODO(fsamuel): We return true here so that the CompositorFrame isn't
- // entirely rejected. We just drop this SurfaceDrawQuad. This failure
- // can happen if the client has an out of date view of the window tree.
- // It would be nice if we can avoid reaching this state in the future.
- return true;
- }
-
- referenced_window_ids_.insert(other_window->id());
-
- ServerWindowSurface* default_surface =
- other_window->GetOrCreateSurfaceManager()->GetDefaultSurface();
- ServerWindowSurface* underlay_surface =
- other_window->GetOrCreateSurfaceManager()->GetUnderlaySurface();
-
- if (!default_surface && !underlay_surface)
- return true;
-
- cc::SurfaceDrawQuad* surface_quad =
- render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
- if (default_surface) {
- surface_quad->SetAll(sqs, input->rect, input->opaque_rect,
- input->visible_rect, input->needs_blending,
- default_surface->id());
- }
- if (underlay_surface) {
- cc::SurfaceDrawQuad* underlay_quad =
- render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
- underlay_quad->SetAll(sqs, input->rect, input->opaque_rect,
- input->visible_rect, input->needs_blending,
- underlay_surface->id());
- }
- return true;
-}
-
void ServerWindowSurface::ReturnResources(
const cc::ReturnedResourceArray& resources) {
if (!client_ || !base::MessageLoop::current())
« no previous file with comments | « components/mus/ws/server_window_surface.h ('k') | components/mus/ws/test_server_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698