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

Unified Diff: content/common/cc_messages.cc

Issue 39463002: Introduce Pickle::{Read,Write}PODArray to serialize arrays of POD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | « base/pickle.cc ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages.cc
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index 8b54af2523c7bbff6a07c3b4005dbef09be8d995..948f1b2d6841d13ddc0da49b798c50dfb5b98123 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -249,13 +249,13 @@ void ParamTraits<gfx::Transform>::Write(
double column_major_data[16];
p.matrix().asColMajord(column_major_data);
#endif
- m->WriteBytes(&column_major_data, sizeof(SkMScalar) * 16);
+ m->WritePODArray<16>(column_major_data);
}
bool ParamTraits<gfx::Transform>::Read(
const Message* m, PickleIterator* iter, param_type* r) {
- const char* column_major_data;
- if (!m->ReadBytes(iter, &column_major_data, sizeof(SkMScalar) * 16))
+ const SkMScalar* column_major_data;
+ if (!m->ReadPODArray<16>(iter, &column_major_data))
return false;
r->matrix().setColMajor(
reinterpret_cast<const SkMScalar*>(column_major_data));
« no previous file with comments | « base/pickle.cc ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698