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

Side by Side Diff: dm/DMSrcSink.h

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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') | 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 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override; 274 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override;
275 const char* fileExtension() const override { return ""; } 275 const char* fileExtension() const override { return ""; }
276 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF lags::kDirect }; } 276 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF lags::kDirect }; }
277 }; 277 };
278 278
279 279
280 class GPUSink : public Sink { 280 class GPUSink : public Sink {
281 public: 281 public:
282 GPUSink(sk_gpu_test::GrContextFactory::ContextType, 282 GPUSink(sk_gpu_test::GrContextFactory::ContextType,
283 sk_gpu_test::GrContextFactory::ContextOptions, 283 sk_gpu_test::GrContextFactory::ContextOptions,
284 int samples, bool diText, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, 284 int samples, bool diText, SkColorType colorType, SkColorProfileType profileType,
285 bool threaded); 285 bool threaded);
286 286
287 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 287 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
288 bool serial() const override { return !fThreaded; } 288 bool serial() const override { return !fThreaded; }
289 const char* fileExtension() const override { return "png"; } 289 const char* fileExtension() const override { return "png"; }
290 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; } 290 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; }
291 private: 291 private:
292 sk_gpu_test::GrContextFactory::ContextType fContextType; 292 sk_gpu_test::GrContextFactory::ContextType fContextType;
293 sk_gpu_test::GrContextFactory::ContextOptions fContextOptions; 293 sk_gpu_test::GrContextFactory::ContextOptions fContextOptions;
294 int fSampleCount; 294 int fSampleCount;
295 bool fUseDIText; 295 bool fUseDIText;
296 SkColorType fColorType; 296 SkColorType fColorType;
297 sk_sp<SkColorSpace> fColorSpace; 297 SkColorProfileType fProfileType;
298 bool fThreaded; 298 bool fThreaded;
299 }; 299 };
300 300
301 class PDFSink : public Sink { 301 class PDFSink : public Sink {
302 public: 302 public:
303 PDFSink(bool pdfa = false) : fPDFA(pdfa) {} 303 PDFSink(bool pdfa = false) : fPDFA(pdfa) {}
304 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 304 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
305 const char* fileExtension() const override { return "pdf"; } 305 const char* fileExtension() const override { return "pdf"; }
306 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 306 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
307 bool fPDFA; 307 bool fPDFA;
308 }; 308 };
309 309
310 class XPSSink : public Sink { 310 class XPSSink : public Sink {
311 public: 311 public:
312 XPSSink(); 312 XPSSink();
313 313
314 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 314 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
315 const char* fileExtension() const override { return "xps"; } 315 const char* fileExtension() const override { return "xps"; }
316 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 316 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
317 }; 317 };
318 318
319 class RasterSink : public Sink { 319 class RasterSink : public Sink {
320 public: 320 public:
321 explicit RasterSink(SkColorType, sk_sp<SkColorSpace> = nullptr); 321 explicit RasterSink(SkColorType, SkColorProfileType=kLinear_SkColorProfileTy pe);
322 322
323 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 323 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
324 const char* fileExtension() const override { return "png"; } 324 const char* fileExtension() const override { return "png"; }
325 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin kFlags::kDirect }; } 325 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kRaster, Sin kFlags::kDirect }; }
326 private: 326 private:
327 SkColorType fColorType; 327 SkColorType fColorType;
328 sk_sp<SkColorSpace> fColorSpace; 328 SkColorProfileType fProfileType;
329 }; 329 };
330 330
331 class SKPSink : public Sink { 331 class SKPSink : public Sink {
332 public: 332 public:
333 SKPSink(); 333 SKPSink();
334 334
335 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 335 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
336 const char* fileExtension() const override { return "skp"; } 336 const char* fileExtension() const override { return "skp"; }
337 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 337 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
338 }; 338 };
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 class ViaMojo : public Via { 421 class ViaMojo : public Via {
422 public: 422 public:
423 explicit ViaMojo(Sink* sink) : Via(sink) {} 423 explicit ViaMojo(Sink* sink) : Via(sink) {}
424 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 424 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
425 }; 425 };
426 426
427 } // namespace DM 427 } // namespace DM
428 428
429 #endif//DMSrcSink_DEFINED 429 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698