Add Protobuf support in cc for gfx objects
Add protobuf serialization to the following:
- gfx::Point
- gfx::PointF
- gfx::Rect
- gfx::RectF
- gfx::Size
- gfx::SizeF
- gfx::Transform
Add a helper class to handle serialization and deserialization. Add
unit tests as well.
BUG=541321
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1394353002
Cr-Commit-Position: refs/heads/master@{#354846}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 2cd502a..2906cd0 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -312,6 +312,8 @@
"playback/raster_source_helper.h",
"playback/transform_display_item.cc",
"playback/transform_display_item.h",
+ "proto/gfx_conversions.cc",
+ "proto/gfx_conversions.h",
"quads/content_draw_quad_base.cc",
"quads/content_draw_quad_base.h",
"quads/debug_border_draw_quad.cc",
@@ -516,6 +518,7 @@
deps = [
"//base",
"//base/third_party/dynamic_annotations",
+ "//cc/proto",
"//cc/surfaces:surface_id",
"//gpu",
"//gpu/command_buffer/client:gles2_interface",
@@ -780,6 +783,7 @@
"playback/display_item_list_unittest.cc",
"playback/display_list_raster_source_unittest.cc",
"playback/display_list_recording_source_unittest.cc",
+ "proto/gfx_conversions_unittest.cc",
"quads/draw_polygon_unittest.cc",
"quads/draw_quad_unittest.cc",
"quads/render_pass_unittest.cc",
@@ -859,6 +863,7 @@
":cc",
":test_support",
"//base/test:test_support",
+ "//cc/proto",
"//cc/surfaces",
"//cc/surfaces:surface_id",
"//gpu",