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

Unified Diff: ui/gfx/mojo/transform_type_converters.cc

Issue 2028573003: Implement gfx::Transform StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing build file 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
« no previous file with comments | « ui/gfx/mojo/transform_type_converters.h ('k') | ui/gfx/mojo/typemaps.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mojo/transform_type_converters.cc
diff --git a/ui/gfx/mojo/transform_type_converters.cc b/ui/gfx/mojo/transform_type_converters.cc
deleted file mode 100644
index 33407f27c17a522d3f12c1bc15addf7d1e22f274..0000000000000000000000000000000000000000
--- a/ui/gfx/mojo/transform_type_converters.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gfx/mojo/transform_type_converters.h"
-
-#include <utility>
-
-namespace mojo {
-
-// static
-TransformPtr TypeConverter<TransformPtr, gfx::Transform>::Convert(
- const gfx::Transform& input) {
- std::vector<float> storage(16);
- input.matrix().asRowMajorf(&storage[0]);
- mojo::Array<float> matrix;
- matrix.Swap(&storage);
- TransformPtr transform(Transform::New());
- transform->matrix = std::move(matrix);
- return transform;
-}
-
-// static
-gfx::Transform TypeConverter<gfx::Transform, TransformPtr>::Convert(
- const TransformPtr& input) {
- if (input.is_null())
- return gfx::Transform();
- gfx::Transform transform(gfx::Transform::kSkipInitialization);
- transform.matrix().setRowMajorf(&input->matrix.storage()[0]);
- return transform;
-}
-
-} // namespace mojo
« no previous file with comments | « ui/gfx/mojo/transform_type_converters.h ('k') | ui/gfx/mojo/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698