Chromium Code Reviews| Index: include/core/SkImageDeserializer.h |
| diff --git a/include/core/SkImageDeserializer.h b/include/core/SkImageDeserializer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..444c35ded2d4a2c839d3cb79156e2afec3e0b66c |
| --- /dev/null |
| +++ b/include/core/SkImageDeserializer.h |
| @@ -0,0 +1,29 @@ |
| +/* |
| + * Copyright 2016 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef SkImageDeserializer_DEFINED |
| +#define SkImageDeserializer_DEFINED |
| + |
| +#include "SkRefCnt.h" |
| + |
| +struct SkIRect; |
| +class SkData; |
| +class SkImage; |
| + |
| +class SK_API SkImageDeserializer { |
| +public: |
| + virtual ~SkImageDeserializer() {} |
| + |
| + /** |
| + * Given a data containing serialized content, return an SkImage from it. |
| + * |
| + * The default implementation is to call SkImage::MakeFromEncoded(...) |
| + */ |
| + virtual sk_sp<SkImage> deserialize(sk_sp<SkData>, const SkIRect* subset); |
|
mtklein
2016/08/10 21:48:31
const sk_sp<SkData>& ?
Passing by value (i.e. alw
reed1
2016/08/10 23:43:19
Happy to go either way. Will switch to pointer.
|
| +}; |
| + |
| +#endif |