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 #ifndef DMSrcSink_DEFINED | 8 #ifndef DMSrcSink_DEFINED |
9 #define DMSrcSink_DEFINED | 9 #define DMSrcSink_DEFINED |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override; | 207 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override; |
208 const char* fileExtension() const override { return ""; } | 208 const char* fileExtension() const override { return ""; } |
209 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF
lags::kDirect }; } | 209 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF
lags::kDirect }; } |
210 }; | 210 }; |
211 | 211 |
212 | 212 |
213 class GPUSink : public Sink { | 213 class GPUSink : public Sink { |
214 public: | 214 public: |
215 GPUSink(GrContextFactory::GLContextType, GrContextFactory::GLContextOptions, | 215 GPUSink(GrContextFactory::GLContextType, GrContextFactory::GLContextOptions, |
216 int samples, bool diText, bool threaded); | 216 int samples, bool diText, SkColorType colorType, SkColorProfileType
profileType, |
| 217 bool threaded); |
217 | 218 |
218 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 219 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
219 bool serial() const override { return !fThreaded; } | 220 bool serial() const override { return !fThreaded; } |
220 const char* fileExtension() const override { return "png"; } | 221 const char* fileExtension() const override { return "png"; } |
221 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl
ags::kDirect }; } | 222 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl
ags::kDirect }; } |
222 private: | 223 private: |
223 GrContextFactory::GLContextType fContextType; | 224 GrContextFactory::GLContextType fContextType; |
224 GrContextFactory::GLContextOptions fContextOptions; | 225 GrContextFactory::GLContextOptions fContextOptions; |
225 int fSampleCount; | 226 int fSampleCount; |
226 bool fUseDIText; | 227 bool fUseDIText; |
| 228 SkColorType fColorType; |
| 229 SkColorProfileType fProfileType; |
227 bool fThreaded; | 230 bool fThreaded; |
228 }; | 231 }; |
229 | 232 |
230 class PDFSink : public Sink { | 233 class PDFSink : public Sink { |
231 public: | 234 public: |
232 PDFSink(const char* rasterizer); | 235 PDFSink(const char* rasterizer); |
233 | 236 |
234 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 237 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
235 const char* fileExtension() const override { return "pdf"; } | 238 const char* fileExtension() const override { return "pdf"; } |
236 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } | 239 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin
kFlags::kDirect }; } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 362 |
360 class ViaMojo : public Via { | 363 class ViaMojo : public Via { |
361 public: | 364 public: |
362 explicit ViaMojo(Sink* sink) : Via(sink) {} | 365 explicit ViaMojo(Sink* sink) : Via(sink) {} |
363 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 366 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
364 }; | 367 }; |
365 | 368 |
366 } // namespace DM | 369 } // namespace DM |
367 | 370 |
368 #endif//DMSrcSink_DEFINED | 371 #endif//DMSrcSink_DEFINED |
OLD | NEW |