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

Side by Side Diff: dm/DMSrcSink.h

Issue 1448883002: Make NVPR a GL context option instead of a GL context (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-02-other-tests-refactor
Patch Set: Created 5 years 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
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, GrGLStandard, int samples, bool diT ext, bool threaded); 217 GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples,
218 bool diText, bool threaded);
219 GPUSink(GrContextFactory::GLContextType, GrContextFactory::GLContextOptions,
220 GrGLStandard, int samples, bool diText, bool threaded);
218 221
219 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 222 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
220 int enclave() const override; 223 int enclave() const override;
221 const char* fileExtension() const override { return "png"; } 224 const char* fileExtension() const override { return "png"; }
222 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; } 225 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; }
223 private: 226 private:
224 GrContextFactory::GLContextType fContextType; 227 GrContextFactory::GLContextType fContextType;
225 GrGLStandard fGpuAPI; 228 GrContextFactory::GLContextOptions fContextOptions;
226 int fSampleCount; 229 GrGLStandard fGpuAPI;
227 bool fUseDIText; 230 int fSampleCount;
228 bool fThreaded; 231 bool fUseDIText;
232 bool fThreaded;
229 }; 233 };
230 234
231 class PDFSink : public Sink { 235 class PDFSink : public Sink {
232 public: 236 public:
233 PDFSink(const char* rasterizer); 237 PDFSink(const char* rasterizer);
234 238
235 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 239 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
236 int enclave() const override { return kAnyThread_Enclave; } 240 int enclave() const override { return kAnyThread_Enclave; }
237 const char* fileExtension() const override { return "pdf"; } 241 const char* fileExtension() const override { return "pdf"; }
238 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 242 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 362
359 class ViaTwice : public Via { 363 class ViaTwice : public Via {
360 public: 364 public:
361 explicit ViaTwice(Sink* sink) : Via(sink) {} 365 explicit ViaTwice(Sink* sink) : Via(sink) {}
362 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 366 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
363 }; 367 };
364 368
365 } // namespace DM 369 } // namespace DM
366 370
367 #endif//DMSrcSink_DEFINED 371 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DMGpuSupport.h ('k') | dm/DMSrcSink.cpp » ('j') | src/gpu/GrContextFactory.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698