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

Side by Side Diff: dm/DMSrcSink.h

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