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/core/SkDocument.h

Issue 72833002: Fix DocumentTest/SkDocument memory leaks (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Added comment Created 7 years, 1 month 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 | « no previous file | src/doc/SkDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDocument.h
===================================================================
--- include/core/SkDocument.h (revision 12300)
+++ include/core/SkDocument.h (working copy)
@@ -64,6 +64,9 @@
* The proc can delete the stream, or whatever it needs to do.
* encoder sets the DCTEncoder for images, to encode a bitmap
* as JPEG (DCT).
+ * Done - clean up method intended to allow deletion of the stream.
+ * Its aborted parameter is true if the cleanup is due to an abort
+ * call. It is false otherwise.
* rasterDpi - the DPI at which features without native PDF support
* will be rasterized (e.g. draw image with perspective,
* draw text with perspective, ...)
@@ -73,7 +76,7 @@
* and it would be slower to be processed or sent online or
* to printer. */
static SkDocument* CreatePDF(
- SkWStream*, void (*Done)(SkWStream*) = NULL,
+ SkWStream*, void (*Done)(SkWStream*,bool aborted) = NULL,
SkPicture::EncodeBitmap encoder = NULL,
SkScalar rasterDpi = SK_ScalarDefaultRasterDPI);
@@ -108,7 +111,7 @@
void abort();
protected:
- SkDocument(SkWStream*, void (*)(SkWStream*));
+ SkDocument(SkWStream*, void (*)(SkWStream*, bool aborted));
// note: subclasses must call close() in their destructor, as the base class
// cannot do this for them.
virtual ~SkDocument();
@@ -128,7 +131,7 @@
private:
SkWStream* fStream;
- void (*fDoneProc)(SkWStream*);
+ void (*fDoneProc)(SkWStream*, bool aborted);
State fState;
typedef SkRefCnt INHERITED;
« no previous file with comments | « no previous file | src/doc/SkDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698