Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 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 SkImageDeserializer_DEFINED | |
| 9 #define SkImageDeserializer_DEFINED | |
| 10 | |
| 11 #include "SkRefCnt.h" | |
| 12 | |
| 13 struct SkIRect; | |
| 14 class SkData; | |
| 15 class SkImage; | |
| 16 | |
| 17 class SK_API SkImageDeserializer { | |
| 18 public: | |
| 19 virtual ~SkImageDeserializer() {} | |
| 20 | |
| 21 /** | |
| 22 * Given a data containing serialized content, return an SkImage from it. | |
| 23 * | |
| 24 * The default implementation is to call SkImage::MakeFromEncoded(...) | |
| 25 */ | |
| 26 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.
| |
| 27 }; | |
| 28 | |
| 29 #endif | |
| OLD | NEW |