| Index: include/core/SkPixelSerializer.h
|
| diff --git a/include/core/SkPixelSerializer.h b/include/core/SkPixelSerializer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7c20ee4a35d352a891ae652284bd821031ff783f
|
| --- /dev/null
|
| +++ b/include/core/SkPixelSerializer.h
|
| @@ -0,0 +1,25 @@
|
| +/*
|
| + * Copyright 2014 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef SkPixelSerializer_DEFINED
|
| +#define SkPixelSerializer_DEFINED
|
| +
|
| +#include "SkRefCnt.h"
|
| +
|
| +class SkData;
|
| +struct SkImageInfo;
|
| +
|
| +class SkPixelSerializer : public SkRefCnt {
|
| +public:
|
| + // return true if you want to serialize the encoded data, false if you want another
|
| + // another version serialized
|
| + virtual bool useEncodedData(SkData*) = 0;
|
| + // If you want to encode these pixels, return the encoded data as an SkData
|
| + // return null if you want to serialize the raw pixels
|
| + virtual SkData* encodePixels(const SkImageInfo&, void* pixels, size_t rowBytes) = 0;
|
| +};
|
| +#endif // SkPixelSerializer_DEFINED
|
|
|