Lines Matching refs:buffer

14 void SkRBuffer::readNoSizeCheck(void* buffer, size_t size)  in readNoSizeCheck()  argument
17 if (buffer) in readNoSizeCheck()
18 memcpy(buffer, fPos, size); in readNoSizeCheck()
37 bool SkRBufferWithSizeCheck::read(void* buffer, size_t size) { in read() argument
40 readNoSizeCheck(buffer, size); in read()
52 void SkWBuffer::writeNoSizeCheck(const void* buffer, size_t size) in writeNoSizeCheck() argument
55 if (fData && buffer) in writeNoSizeCheck()
56 memcpy(fPos, buffer, size); in writeNoSizeCheck()
79 static void AssertBuffer32(const void* buffer)
81 SkASSERT(buffer);
82 SkASSERT(((size_t)buffer & 3) == 0);
85 #define AssertBuffer32(buffer)
88 void* sk_buffer_write_int32(void* buffer, int32_t value)
90 AssertBuffer32(buffer);
91 *(int32_t*)buffer = value;
92 return (char*)buffer + sizeof(int32_t);
95 void* sk_buffer_write_int32(void* buffer, const int32_t values[], int count)
97 AssertBuffer32(buffer);
100 memcpy((int32_t*)buffer, values, count * sizeof(int32_t));
101 return (char*)buffer + count * sizeof(int32_t);
104 const void* sk_buffer_read_int32(const void* buffer, int32_t* value)
106 AssertBuffer32(buffer);
108 *value = *(const int32_t*)buffer;
109 return (const char*)buffer + sizeof(int32_t);
112 const void* sk_buffer_read_int32(const void* buffer, int32_t values[], int count)
114 AssertBuffer32(buffer);
118 memcpy(values, (const int32_t*)buffer, count * sizeof(int32_t));
119 return (const char*)buffer + count * sizeof(int32_t);
122 void* sk_buffer_write_ptr(void* buffer, void* ptr)
124 AssertBuffer32(buffer);
125 *(void**)buffer = ptr;
126 return (char*)buffer + sizeof(void*);
129 const void* sk_buffer_read_ptr(const void* buffer, void** ptr)
131 AssertBuffer32(buffer);
133 *ptr = *(void**)buffer;
134 return (const char*)buffer + sizeof(void*);