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

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

Issue 2008193002: Change mojo geometry structs from using type converters to StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
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 f210f2ec912c7dd630890986a1901cc9ab6e8a60..49ac7e398b38279f436c1194d1843d11e4695139 100644
--- a/components/mus/ws/server_window_surface.cc
+++ b/components/mus/ws/server_window_surface.cc
@@ -12,7 +12,6 @@
#include "components/mus/ws/server_window.h"
#include "components/mus/ws/server_window_delegate.h"
#include "components/mus/ws/server_window_surface_manager.h"
-#include "ui/gfx/geometry/mojo/geometry_type_converters.h"
namespace mus {
namespace ws {
@@ -52,7 +51,7 @@ ServerWindowSurface::~ServerWindowSurface() {
void ServerWindowSurface::SubmitCompositorFrame(
mojom::CompositorFramePtr frame,
const SubmitCompositorFrameCallback& callback) {
- gfx::Size frame_size = frame->passes[0]->output_rect.To<gfx::Rect>().size();
+ gfx::Size frame_size = frame->passes[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.
@@ -136,18 +135,16 @@ bool ServerWindowSurface::ConvertSurfaceDrawQuad(
cc::SurfaceDrawQuad* surface_quad =
render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
if (default_surface) {
- surface_quad->SetAll(sqs, input->rect.To<gfx::Rect>(),
- input->opaque_rect.To<gfx::Rect>(),
- input->visible_rect.To<gfx::Rect>(),
- input->needs_blending, default_surface->id());
+ 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.To<gfx::Rect>(),
- input->opaque_rect.To<gfx::Rect>(),
- input->visible_rect.To<gfx::Rect>(),
- input->needs_blending, underlay_surface->id());
+ underlay_quad->SetAll(sqs, input->rect, input->opaque_rect,
+ input->visible_rect, input->needs_blending,
+ underlay_surface->id());
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698