OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "PdfRenderer.h" | 8 #include "PdfRenderer.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 fPdfDoc.reset(NULL); | 44 fPdfDoc.reset(NULL); |
45 } | 45 } |
46 | 46 |
47 bool SimplePdfRenderer::render() { | 47 bool SimplePdfRenderer::render() { |
48 SkASSERT(fCanvas.get() != NULL); | 48 SkASSERT(fCanvas.get() != NULL); |
49 SkASSERT(fPicture != NULL); | 49 SkASSERT(fPicture != NULL); |
50 if (NULL == fCanvas.get() || NULL == fPicture) { | 50 if (NULL == fCanvas.get() || NULL == fPicture) { |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 fCanvas->drawPicture(*fPicture); | 54 fCanvas->drawPicture(fPicture); |
55 fCanvas->flush(); | 55 fCanvas->flush(); |
56 | 56 |
57 return fPdfDoc->close(); | 57 return fPdfDoc->close(); |
58 } | 58 } |
59 | 59 |
60 } | 60 } |
OLD | NEW |