Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h |
=================================================================== |
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h (revision 9988) |
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h (working copy) |
@@ -83,9 +83,11 @@ |
int fCurrentUsed; |
SkPdfObject* allocBlock(); |
+ size_t fSizeInBytes; |
public: |
SkPdfAllocator() { |
+ fSizeInBytes = sizeof(*this); |
fCurrent = allocBlock(); |
fCurrentUsed = 0; |
} |
@@ -98,8 +100,13 @@ |
void* alloc(size_t bytes) { |
void* data = malloc(bytes); |
fHandles.push(data); |
+ fSizeInBytes += bytes; |
return data; |
} |
+ |
+ size_t bytesUsed() { |
+ return fSizeInBytes; |
+ } |
}; |
class SkNativeParsedPDF; |