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

Unified Diff: cc/ipc/surface_id_struct_traits.h

Issue 2537343004: Add SurfaceReference class. (Closed)
Patch Set: Fixes. Created 4 years 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/ipc/struct_traits_unittest.cc ('k') | cc/ipc/surface_reference.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/surface_id_struct_traits.h
diff --git a/cc/ipc/surface_id_struct_traits.h b/cc/ipc/surface_id_struct_traits.h
index 6f66c9fd31a0ab29f8e0a033a8270e2fc5ab0556..6a9bee396f30b383e783ae7722dd42bfece7a5cc 100644
--- a/cc/ipc/surface_id_struct_traits.h
+++ b/cc/ipc/surface_id_struct_traits.h
@@ -9,6 +9,7 @@
#include "cc/ipc/local_frame_id_struct_traits.h"
#include "cc/ipc/surface_id.mojom-shared.h"
#include "cc/surfaces/frame_sink_id.h"
+#include "cc/surfaces/local_frame_id.h"
#include "cc/surfaces/surface_id.h"
namespace mojo {
@@ -24,16 +25,8 @@ struct StructTraits<cc::mojom::SurfaceIdDataView, cc::SurfaceId> {
}
static bool Read(cc::mojom::SurfaceIdDataView data, cc::SurfaceId* out) {
- cc::FrameSinkId frame_sink_id;
- if (!data.ReadFrameSinkId(&frame_sink_id))
- return false;
-
- cc::LocalFrameId local_frame_id;
- if (!data.ReadLocalFrameId(&local_frame_id))
- return false;
-
- *out = cc::SurfaceId(frame_sink_id, local_frame_id);
- return true;
+ return data.ReadFrameSinkId(&out->frame_sink_id_) &&
+ data.ReadLocalFrameId(&out->local_frame_id_);
}
};
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/ipc/surface_reference.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698