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

Unified Diff: ipc/ipc_message_utils.h

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index b05f76dd17334c7a98385dc1114795e0bf384ec4..598c0e56c18d72059e835af9513947ff9b59981f 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -161,6 +161,22 @@ struct ParamTraits<unsigned int> {
};
template <>
+struct ParamTraits<void*> {
+ typedef void* param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteLongUsingDangerousNonPortableLessPersistableForm(
+ reinterpret_cast<long>(p));
+ }
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
+ long p = 0;
+ bool ret = m->ReadLong(iter, &p);
+ *r = reinterpret_cast<void*>(p);
+ return ret;
+ }
+ IPC_EXPORT static void Log(const param_type& p, std::string* l) {}
+};
+
+template <>
struct ParamTraits<long> {
typedef long param_type;
static void Write(Message* m, const param_type& p) {

Powered by Google App Engine
This is Rietveld 408576698