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

Unified Diff: include/core/SkWriteBuffer.h

Issue 240013005: read/write function_ptrs as just void*, and not as 'array of bytes' (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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: include/core/SkWriteBuffer.h
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h
index 332dfaea40e56d48a1e3f1dc37ab8cdecf11077d..04acbf10cbbd384a9d0d5b949fdf434c2045ac74 100644
--- a/include/core/SkWriteBuffer.h
+++ b/include/core/SkWriteBuffer.h
@@ -58,7 +58,7 @@ public:
void write32(int32_t value);
void writeString(const char* value);
void writeEncodedString(const void* value, size_t byteLength, SkPaint::TextEncoding encoding);
- void writeFunctionPtr(void* ptr) { this->writeByteArray(&ptr, sizeof(ptr)); }
+ void writeFunctionPtr(void* ptr) { fWriter.writePtr(ptr); }
void writeFlattenable(const SkFlattenable* flattenable);
void writeColor(const SkColor& color);

Powered by Google App Engine
This is Rietveld 408576698