aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-07-09 14:08:49 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-09 14:08:49 -0700
commitd7c05bfd7c81a835a78b4163026a4dfa573faa89 (patch)
tree51222eac901b91d6998c0ccf8e6a3d202b858aa4 /include
parentac09471140ffc9f7cdf07cfa1a5fdc311b3747b5 (diff)
remove getter for imagegenerator factory, update test
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*);
};