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

Unified Diff: cc/proto/cc_conversions.h

Issue 1460503004: Add support for converting cc::Region to and from protobuf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-more-conversions
Patch Set: Added a test for subtraction of overlapping rects Created 5 years, 1 month 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 | « cc/proto/BUILD.gn ('k') | cc/proto/cc_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/proto/cc_conversions.h
diff --git a/cc/proto/cc_conversions.h b/cc/proto/cc_conversions.h
new file mode 100644
index 0000000000000000000000000000000000000000..4060e6f5a0fc3edb057184f07d7304f245a3b18e
--- /dev/null
+++ b/cc/proto/cc_conversions.h
@@ -0,0 +1,24 @@
+// 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.
+
+#ifndef CC_PROTO_CC_CONVERSIONS_H_
+#define CC_PROTO_CC_CONVERSIONS_H_
+
+#include "cc/base/cc_export.h"
+
+namespace cc {
+class Region;
+
+namespace proto {
+class Region;
+} // namespace proto
+
+// TODO(dtrainor): Move these to a class and make them static
+// (crbug.com/548432).
+CC_EXPORT void RegionToProto(const Region& region, proto::Region* proto);
+CC_EXPORT Region RegionFromProto(const proto::Region& proto);
+
+} // namespace cc
+
+#endif // CC_PROTO_CC_CONVERSIONS_H_
« no previous file with comments | « cc/proto/BUILD.gn ('k') | cc/proto/cc_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698