OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" |
11 #include "SkGraphics.h" | 11 #include "SkGraphics.h" |
12 #include "SkImageDecoder.h" | 12 #include "SkImageDecoder.h" |
13 #include "SkImageEncoder.h" | 13 #include "SkImageEncoder.h" |
14 #include "SkOSFile.h" | 14 #include "SkOSFile.h" |
15 #include "SkPicture.h" | 15 #include "SkPicture.h" |
16 #include "SkStream.h" | 16 #include "SkStream.h" |
17 #include "SkTypeface.h" | 17 #include "SkTypeface.h" |
18 #include "SkTArray.h" | 18 #include "SkTArray.h" |
19 #include "picture_utils.h" | |
20 | 19 |
21 #include <iostream> | 20 #include <iostream> |
22 #include <cstdio> | 21 #include <cstdio> |
23 #include <stack> | 22 #include <stack> |
24 #include <set> | 23 #include <set> |
25 | 24 |
26 __SK_FORCE_IMAGE_DECODER_LINKING; | 25 __SK_FORCE_IMAGE_DECODER_LINKING; |
27 | 26 |
28 // TODO(edisonn): tool, show what objects were read at least, show the ones not
even read | 27 // TODO(edisonn): tool, show what objects were read at least, show the ones not
even read |
29 // keep for each object pos in file | 28 // keep for each object pos in file |
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 | 2005 |
2007 void SkPdfRenderer::unload() { | 2006 void SkPdfRenderer::unload() { |
2008 delete fPdfDoc; | 2007 delete fPdfDoc; |
2009 fPdfDoc = NULL; | 2008 fPdfDoc = NULL; |
2010 } | 2009 } |
2011 | 2010 |
2012 SkRect SkPdfRenderer::MediaBox(int page) const { | 2011 SkRect SkPdfRenderer::MediaBox(int page) const { |
2013 SkASSERT(fPdfDoc); | 2012 SkASSERT(fPdfDoc); |
2014 return fPdfDoc->MediaBox(page); | 2013 return fPdfDoc->MediaBox(page); |
2015 } | 2014 } |
| 2015 |
| 2016 size_t SkPdfRenderer::bytesUsed() { |
| 2017 return fPdfDoc ? fPdfDoc->bytesUsed() : 0; |
| 2018 } |
| 2019 |
OLD | NEW |