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

Unified Diff: components/mus/public/cpp/surfaces/surfaces_utils.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/public/cpp/surfaces/surfaces_utils.cc
diff --git a/components/mus/public/cpp/surfaces/surfaces_utils.cc b/components/mus/public/cpp/surfaces/surfaces_utils.cc
index 31f87aa839890297774e9fbdac5b873278102678..8cd5ad167531276f6840998ba3b4eb50a517f41a 100644
--- a/components/mus/public/cpp/surfaces/surfaces_utils.cc
+++ b/components/mus/public/cpp/surfaces/surfaces_utils.cc
@@ -4,7 +4,6 @@
#include "components/mus/public/cpp/surfaces/surfaces_utils.h"
-#include "ui/gfx/geometry/mojo/geometry_type_converters.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/mojo/transform_type_converters.h"
@@ -20,9 +19,9 @@ namespace mojo {
SharedQuadStatePtr CreateDefaultSQS(const gfx::Size& size) {
SharedQuadStatePtr sqs = SharedQuadState::New();
sqs->quad_to_target_transform = Transform::From(gfx::Transform());
- sqs->quad_layer_bounds = Size::From(size);
- sqs->visible_quad_layer_rect = Rect::From(gfx::Rect(size));
- sqs->clip_rect = Rect::From(gfx::Rect(size));
+ sqs->quad_layer_bounds = size;
+ sqs->visible_quad_layer_rect = gfx::Rect(size);
+ sqs->clip_rect = gfx::Rect(size);
sqs->is_clipped = false;
sqs->opacity = 1.f;
sqs->blend_mode = mus::mojom::SkXfermode::kSrc_Mode;
@@ -36,8 +35,8 @@ PassPtr CreateDefaultPass(int id, const gfx::Rect& rect) {
render_pass_id.layer_id = 1;
render_pass_id.index = id;
pass->id = render_pass_id;
- pass->output_rect = Rect::From(rect);
- pass->damage_rect = Rect::From(rect);
+ pass->output_rect = rect;
+ pass->damage_rect = rect;
pass->transform_to_root_target = Transform::From(gfx::Transform());
pass->has_transparent_background = false;
return pass;

Powered by Google App Engine
This is Rietveld 408576698