| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "DMPDFRasterizeTask.h" | 8 #include "DMPDFRasterizeTask.h" |
| 9 #include "DMUtil.h" | 9 #include "DMUtil.h" |
| 10 #include "DMWriteTask.h" | 10 #include "DMWriteTask.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 , fPdf(pdf) | 22 , fPdf(pdf) |
| 23 , fRasterize(proc) { | 23 , fRasterize(proc) { |
| 24 SkASSERT(fPdf.get()); | 24 SkASSERT(fPdf.get()); |
| 25 SkASSERT(fPdf->unique()); | 25 SkASSERT(fPdf->unique()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void PDFRasterizeTask::draw() { | 28 void PDFRasterizeTask::draw() { |
| 29 SkBitmap bitmap; | 29 SkBitmap bitmap; |
| 30 | 30 |
| 31 if (fRasterize(fPdf.get(), &bitmap)) { | 31 if (fRasterize(fPdf.get(), &bitmap)) { |
| 32 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); | 32 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "PDF", bitmap))); |
| 33 } else { | 33 } else { |
| 34 this->fail(); | 34 this->fail(); |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace DM | 38 } // namespace DM |
| OLD | NEW |