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

Side by Side Diff: dm/DMSrcSink.h

Issue 1750383002: Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ANGLE sRGB, which isn't going to be supported in the near term. Created 4 years, 9 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 354
352 class ViaMojo : public Via { 355 class ViaMojo : public Via {
353 public: 356 public:
354 explicit ViaMojo(Sink* sink) : Via(sink) {} 357 explicit ViaMojo(Sink* sink) : Via(sink) {}
355 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 358 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
356 }; 359 };
357 360
358 } // namespace DM 361 } // namespace DM
359 362
360 #endif//DMSrcSink_DEFINED 363 #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