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