Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: dm/DMPDFTask.cpp

Issue 551873003: Update DM JSON format. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dm/DMPDFRasterizeTask.cpp ('k') | dm/DMPipeTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "DMPDFTask.h" 8 #include "DMPDFTask.h"
9 #include "DMPDFRasterizeTask.h" 9 #include "DMPDFRasterizeTask.h"
10 #include "DMUtil.h" 10 #include "DMUtil.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 SinglePagePDF pdf(fPicture->cullRect().width(), fPicture->cullRect().hei ght()); 79 SinglePagePDF pdf(fPicture->cullRect().width(), fPicture->cullRect().hei ght());
80 fPicture->playback(pdf.canvas()); 80 fPicture->playback(pdf.canvas());
81 pdfData.reset(pdf.end()); 81 pdfData.reset(pdf.end());
82 } 82 }
83 83
84 SkASSERT(pdfData.get()); 84 SkASSERT(pdfData.get());
85 if (rasterize) { 85 if (rasterize) {
86 this->spawnChild(SkNEW_ARGS(PDFRasterizeTask, 86 this->spawnChild(SkNEW_ARGS(PDFRasterizeTask,
87 (*this, pdfData->duplicate(), fRasterize))); 87 (*this, pdfData->duplicate(), fRasterize)));
88 } 88 }
89 const char* sourceType = fGM.get() ? "GM" : "SKP";
89 this->spawnChild(SkNEW_ARGS(WriteTask, 90 this->spawnChild(SkNEW_ARGS(WriteTask,
90 (*this, pdfData->duplicate(), ".pdf"))); 91 (*this, sourceType, pdfData->duplicate(), ".pdf" )));
91 } 92 }
92 93
93 bool PDFTask::shouldSkip() const { 94 bool PDFTask::shouldSkip() const {
94 if (!FLAGS_pdf) { 95 if (!FLAGS_pdf) {
95 return true; 96 return true;
96 } 97 }
97 if (fGM.get() && 0 != (fGM->getFlags() & skiagm::GM::kSkipPDF_Flag)) { 98 if (fGM.get() && 0 != (fGM->getFlags() & skiagm::GM::kSkipPDF_Flag)) {
98 return true; 99 return true;
99 } 100 }
100 return false; 101 return false;
101 } 102 }
102 103
103 } // namespace DM 104 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMPDFRasterizeTask.cpp ('k') | dm/DMPipeTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698