aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkGraphics.h6
-rw-r--r--include/core/SkImageGenerator.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h
index e552633d5f..f2e3d8dac0 100644
--- a/include/core/SkGraphics.h
+++ b/include/core/SkGraphics.h
@@ -150,9 +150,11 @@ public:
* To instantiate images from encoded data, first looks at this runtime function-ptr. If it
* exists, it is called to create an SkImageGenerator from SkData. If there is no function-ptr
* or there is, but it returns NULL, then skia will call its internal default implementation.
+ *
+ * Returns the previous factory (which could be NULL).
*/
- static ImageGeneratorFromEncodedFactory GetImageGeneratorFromEncodedFactory();
- static void SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory);
+ static ImageGeneratorFromEncodedFactory
+ SetImageGeneratorFromEncodedFactory(ImageGeneratorFromEncodedFactory);
};
class SkAutoGraphics {
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index 46001c8537..c133476d5b 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -221,6 +221,9 @@ protected:
private:
const SkImageInfo fInfo;
+ // This is our default impl, which may be different on different platforms.
+ // It is called from NewFromEncoded() after it has checked for any runtime factory.
+ // The SkData will never be NULL, as that will have been checked by NewFromEncoded.
static SkImageGenerator* NewFromEncodedImpl(SkData*);
};