OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkFlate.h" | 9 #include "SkFlate.h" |
10 #include "SkPDFBitmap.h" | 10 #include "SkPDFBitmap.h" |
11 #include "SkPDFCanon.h" | 11 #include "SkPDFCanon.h" |
12 #include "SkPDFCatalog.h" | 12 #include "SkPDFCatalog.h" |
13 #include "SkPDFDocument.h" | |
14 #include "SkStream.h" | 13 #include "SkStream.h" |
15 #include "SkUnPreMultiply.h" | 14 #include "SkUnPreMultiply.h" |
16 | 15 |
17 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
18 | 17 |
19 static void pdf_stream_begin(SkWStream* stream) { | 18 static void pdf_stream_begin(SkWStream* stream) { |
20 static const char streamBegin[] = " stream\n"; | 19 static const char streamBegin[] = " stream\n"; |
21 stream->write(streamBegin, strlen(streamBegin)); | 20 stream->write(streamBegin, strlen(streamBegin)); |
22 } | 21 } |
23 | 22 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 return NULL; | 307 return NULL; |
309 } | 308 } |
310 // PDFAlphaBitmaps do not get directly canonicalized (they | 309 // PDFAlphaBitmaps do not get directly canonicalized (they |
311 // are refed by the SkPDFBitmap). | 310 // are refed by the SkPDFBitmap). |
312 smask = SkNEW_ARGS(PDFAlphaBitmap, (bm)); | 311 smask = SkNEW_ARGS(PDFAlphaBitmap, (bm)); |
313 } | 312 } |
314 pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (bm, smask)); | 313 pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (bm, smask)); |
315 canon->addBitmap(pdfBitmap); | 314 canon->addBitmap(pdfBitmap); |
316 return pdfBitmap; | 315 return pdfBitmap; |
317 } | 316 } |
OLD | NEW |