OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkFlattenableBuffers.h" | 8 #include "SkFlattenableBuffers.h" |
9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkTypeface.h" | 10 #include "SkTypeface.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 | 83 |
84 SkUnitMapper* SkFlattenableReadBuffer::readUnitMapper() { | 84 SkUnitMapper* SkFlattenableReadBuffer::readUnitMapper() { |
85 return this->readFlattenableT<SkUnitMapper>(); | 85 return this->readFlattenableT<SkUnitMapper>(); |
86 } | 86 } |
87 | 87 |
88 SkXfermode* SkFlattenableReadBuffer::readXfermode() { | 88 SkXfermode* SkFlattenableReadBuffer::readXfermode() { |
89 return this->readFlattenableT<SkXfermode>(); | 89 return this->readFlattenableT<SkXfermode>(); |
90 } | 90 } |
91 | 91 |
| 92 bool SkFlattenableReadBuffer::validate(bool isValid) { |
| 93 return true; |
| 94 } |
| 95 |
92 /////////////////////////////////////////////////////////////////////////////// | 96 /////////////////////////////////////////////////////////////////////////////// |
93 | 97 |
94 SkFlattenableWriteBuffer::SkFlattenableWriteBuffer() { | 98 SkFlattenableWriteBuffer::SkFlattenableWriteBuffer() { |
95 fFlags = (Flags)0; | 99 fFlags = (Flags)0; |
96 } | 100 } |
97 | 101 |
98 SkFlattenableWriteBuffer::~SkFlattenableWriteBuffer() { } | 102 SkFlattenableWriteBuffer::~SkFlattenableWriteBuffer() { } |
99 | 103 |
100 void SkFlattenableWriteBuffer::writeFunctionPtr(void* ptr) { | 104 void SkFlattenableWriteBuffer::writeFunctionPtr(void* ptr) { |
101 void* ptrStorage[] = { ptr }; | 105 void* ptrStorage[] = { ptr }; |
102 this->writeByteArray(ptrStorage, sizeof(void*)); | 106 this->writeByteArray(ptrStorage, sizeof(void*)); |
103 } | 107 } |
104 | 108 |
105 void SkFlattenableWriteBuffer::writePaint(const SkPaint& paint) { | 109 void SkFlattenableWriteBuffer::writePaint(const SkPaint& paint) { |
106 paint.flatten(*this); | 110 paint.flatten(*this); |
107 } | 111 } |
108 | 112 |
109 void SkFlattenableWriteBuffer::flattenObject(const SkFlattenable* obj, | 113 void SkFlattenableWriteBuffer::flattenObject(const SkFlattenable* obj, |
110 SkFlattenableWriteBuffer& buffer) { | 114 SkFlattenableWriteBuffer& buffer) { |
111 obj->flatten(buffer); | 115 obj->flatten(buffer); |
112 } | 116 } |
OLD | NEW |