| Index: src/pipe/SkGPipeWrite.cpp
|
| diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
|
| index 0131ebb8764306520dabac25598078705b9dad1c..68acc179e766c5c19abc9840a3a99d82a76e3a0f 100644
|
| --- a/src/pipe/SkGPipeWrite.cpp
|
| +++ b/src/pipe/SkGPipeWrite.cpp
|
| @@ -150,20 +150,13 @@ const SkFlatData* FlattenableHeap::flatToReplace() const {
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -class FlatDictionary : public SkFlatDictionary<SkFlattenable> {
|
| -public:
|
| - FlatDictionary(FlattenableHeap* heap)
|
| - : SkFlatDictionary<SkFlattenable>(heap) {
|
| - fFlattenProc = &flattenFlattenableProc;
|
| - // No need to define fUnflattenProc since the writer will never
|
| - // unflatten the data.
|
| - }
|
| - static void flattenFlattenableProc(SkOrderedWriteBuffer& buffer,
|
| - const void* obj) {
|
| - buffer.writeFlattenable((SkFlattenable*)obj);
|
| +struct SkFlattenableTraits {
|
| + static void flatten(SkOrderedWriteBuffer& buffer, const SkFlattenable& flattenable) {
|
| + buffer.writeFlattenable(&flattenable);
|
| }
|
| -
|
| + // No need to define unflatten if we never call it.
|
| };
|
| +typedef SkFlatDictionary<SkFlattenable, SkFlattenableTraits> FlatDictionary;
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|