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

Unified Diff: webkit/glue/webcursor.cc

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 years, 9 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 | « webkit/glue/webcursor.h ('k') | webkit/glue/webcursor_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webcursor.cc
diff --git a/webkit/glue/webcursor.cc b/webkit/glue/webcursor.cc
index 292ca0db8e895bdacd85d2fe6e34410a6326298e..94c2781afd10e88e1a29dde9346f237ab5a015b9 100644
--- a/webkit/glue/webcursor.cc
+++ b/webkit/glue/webcursor.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -70,18 +70,18 @@ void WebCursor::GetCursorInfo(WebCursorInfo* cursor_info) const {
#endif
}
-bool WebCursor::Deserialize(const Pickle* pickle, void** iter) {
+bool WebCursor::Deserialize(PickleIterator* iter) {
int type, hotspot_x, hotspot_y, size_x, size_y, data_len;
const char* data;
// Leave |this| unmodified unless we are going to return success.
- if (!pickle->ReadInt(iter, &type) ||
- !pickle->ReadInt(iter, &hotspot_x) ||
- !pickle->ReadInt(iter, &hotspot_y) ||
- !pickle->ReadLength(iter, &size_x) ||
- !pickle->ReadLength(iter, &size_y) ||
- !pickle->ReadData(iter, &data, &data_len))
+ if (!iter->ReadInt(&type) ||
+ !iter->ReadInt(&hotspot_x) ||
+ !iter->ReadInt(&hotspot_y) ||
+ !iter->ReadLength(&size_x) ||
+ !iter->ReadLength(&size_y) ||
+ !iter->ReadData(&data, &data_len))
return false;
// Ensure the size is sane, and there is enough data.
@@ -111,7 +111,7 @@ bool WebCursor::Deserialize(const Pickle* pickle, void** iter) {
}
}
}
- return DeserializePlatformData(pickle, iter);
+ return DeserializePlatformData(iter);
}
bool WebCursor::Serialize(Pickle* pickle) const {
« no previous file with comments | « webkit/glue/webcursor.h ('k') | webkit/glue/webcursor_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698