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

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

Issue 2092843002: Implement CompositorFrame Struct Traits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dcheng's comments 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/window_server.cc » ('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 9f19551b56537f710b48b3d6d3e90a52297b09a4..19482d2a72fd51cd799310cf31bb4b4089db6ad3 100644
--- a/components/mus/ws/server_window_surface.cc
+++ b/components/mus/ws/server_window_surface.cc
@@ -8,7 +8,6 @@
#include "cc/output/compositor_frame.h"
#include "cc/quads/shared_quad_state.h"
#include "cc/quads/surface_draw_quad.h"
-#include "components/mus/public/cpp/surfaces/surfaces_type_converters.h"
#include "components/mus/surfaces/surfaces_state.h"
#include "components/mus/ws/server_window.h"
#include "components/mus/ws/server_window_delegate.h"
@@ -50,9 +49,10 @@ ServerWindowSurface::~ServerWindowSurface() {
}
void ServerWindowSurface::SubmitCompositorFrame(
- cc::mojom::CompositorFramePtr frame,
+ cc::CompositorFrame frame,
const SubmitCompositorFrameCallback& callback) {
- gfx::Size frame_size = frame->passes[0]->output_rect.size();
+ gfx::Size frame_size =
+ frame.delegated_frame_data->render_pass_list[0]->output_rect.size();
if (!surface_id_.is_null()) {
// If the size of the CompostiorFrame has changed then destroy the existing
// Surface and create a new one of the appropriate size.
@@ -70,8 +70,9 @@ void ServerWindowSurface::SubmitCompositorFrame(
surface_factory_.Create(surface_id_);
}
}
- surface_factory_.SubmitCompositorFrame(surface_id_,
- ConvertToCompositorFrame(frame),
+ std::unique_ptr<cc::CompositorFrame> frame_copy(new cc::CompositorFrame);
+ *frame_copy = std::move(frame);
+ surface_factory_.SubmitCompositorFrame(surface_id_, std::move(frame_copy),
base::Bind(&CallCallback, callback));
last_submitted_frame_size_ = frame_size;
window()->delegate()->OnScheduleWindowPaint(window());
« no previous file with comments | « components/mus/ws/server_window_surface.h ('k') | components/mus/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698