OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkPixelSerializer_DEFINED |
| 9 #define SkPixelSerializer_DEFINED |
| 10 |
| 11 #include "SkRefCnt.h" |
| 12 |
| 13 class SkData; |
| 14 struct SkImageInfo; |
| 15 |
| 16 class SkPixelSerializer : public SkRefCnt { |
| 17 public: |
| 18 // return true if you want to serialize the encoded data, false if you want
another |
| 19 // another version serialized |
| 20 virtual bool useEncodedData(SkData*) = 0; |
| 21 // If you want to encode these pixels, return the encoded data as an SkData |
| 22 // return null if you want to serialize the raw pixels |
| 23 virtual SkData* encodePixels(const SkImageInfo&, void* pixels, size_t rowByt
es) = 0; |
| 24 }; |
| 25 #endif // SkPixelSerializer_DEFINED |
OLD | NEW |