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

Side by Side Diff: dm/DMSrcSink.h

Issue 1063873004: DM: add --multiPage option (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef DMSrcSink_DEFINED 8 #ifndef DMSrcSink_DEFINED
9 #define DMSrcSink_DEFINED 9 #define DMSrcSink_DEFINED
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 private: 159 private:
160 GrContextFactory::GLContextType fContextType; 160 GrContextFactory::GLContextType fContextType;
161 GrGLStandard fGpuAPI; 161 GrGLStandard fGpuAPI;
162 int fSampleCount; 162 int fSampleCount;
163 bool fUseDFText; 163 bool fUseDFText;
164 bool fThreaded; 164 bool fThreaded;
165 }; 165 };
166 166
167 class PDFSink : public Sink { 167 class PDFSink : public Sink {
168 public: 168 public:
169 PDFSink(); 169 PDFSink(bool multiPage = false);
170 170
171 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 171 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
172 int enclave() const override { return kAnyThread_Enclave; } 172 int enclave() const override { return kAnyThread_Enclave; }
173 const char* fileExtension() const override { return "pdf"; } 173 const char* fileExtension() const override { return "pdf"; }
174
175 private:
176 bool fMultiPage;
174 }; 177 };
175 178
176 class XPSSink : public Sink { 179 class XPSSink : public Sink {
177 public: 180 public:
178 XPSSink(); 181 XPSSink(bool multiPage = false);
179 182
180 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 183 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
181 int enclave() const override { return kAnyThread_Enclave; } 184 int enclave() const override { return kAnyThread_Enclave; }
182 const char* fileExtension() const override { return "xps"; } 185 const char* fileExtension() const override { return "xps"; }
186
187 private:
188 bool fMultiPage;
183 }; 189 };
184 190
185 class RasterSink : public Sink { 191 class RasterSink : public Sink {
186 public: 192 public:
187 explicit RasterSink(SkColorType); 193 explicit RasterSink(SkColorType);
188 194
189 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 195 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
190 int enclave() const override { return kAnyThread_Enclave; } 196 int enclave() const override { return kAnyThread_Enclave; }
191 const char* fileExtension() const override { return "png"; } 197 const char* fileExtension() const override { return "png"; }
192 private: 198 private:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 286 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
281 int enclave() const override { return fSink->enclave(); } 287 int enclave() const override { return fSink->enclave(); }
282 const char* fileExtension() const override { return fSink->fileExtension(); } 288 const char* fileExtension() const override { return fSink->fileExtension(); }
283 private: 289 private:
284 SkAutoTDelete<Sink> fSink; 290 SkAutoTDelete<Sink> fSink;
285 }; 291 };
286 292
287 } // namespace DM 293 } // namespace DM
288 294
289 #endif//DMSrcSink_DEFINED 295 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698