Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: include/utils/mac/SkCGUtils.h

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/utils/SkFrontBufferedStream.h ('k') | samplecode/SampleAnimator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/mac/SkCGUtils.h
diff --git a/include/utils/mac/SkCGUtils.h b/include/utils/mac/SkCGUtils.h
index a0fe666d2c29d4443f96a1d24aa9578b1d821f0c..7ac0431b25f0066e2da17b9287868687e9b59456 100644
--- a/include/utils/mac/SkCGUtils.h
+++ b/include/utils/mac/SkCGUtils.h
@@ -62,20 +62,17 @@ static inline CGImageRef SkCreateCGImageRef(const SkBitmap& bm) {
*/
void SkCGDrawBitmap(CGContextRef, const SkBitmap&, float x, float y);
+/**
+ * Create an SkBitmap drawing of the encoded PDF document, returning true on
+ * success. Deletes the stream when finished.
+ */
bool SkPDFDocumentToBitmap(SkStream* stream, SkBitmap* output);
/**
- * Return a provider that wraps the specified stream. It will become an
- * owner of the stream, so the caller must still manage its ownership.
- *
- * To hand-off ownership of the stream to the provider, the caller must do
- * something like the following:
- *
- * SkStream* stream = new ...;
- * CGDataProviderRef provider = SkStreamToDataProvider(stream);
- * stream->unref();
+ * Return a provider that wraps the specified stream. It will become the only
+ * owner of the stream, so the caller must stop referring to the stream.
*
- * Now when the provider is finally deleted, it will delete the stream.
+ * When the provider is finally deleted, it will delete the stream.
*/
CGDataProviderRef SkCreateDataProviderFromStream(SkStream*);
« no previous file with comments | « include/utils/SkFrontBufferedStream.h ('k') | samplecode/SampleAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698