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

Side by Side Diff: dm/DMSrcSink.h

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 8 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/DMGpuSupport.h ('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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 NullSink() {} 225 NullSink() {}
226 226
227 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override; 227 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override;
228 const char* fileExtension() const override { return ""; } 228 const char* fileExtension() const override { return ""; }
229 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF lags::kDirect }; } 229 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kNull, SinkF lags::kDirect }; }
230 }; 230 };
231 231
232 232
233 class GPUSink : public Sink { 233 class GPUSink : public Sink {
234 public: 234 public:
235 GPUSink(GrContextFactory::GLContextType, GrContextFactory::GLContextOptions, 235 GPUSink(sk_gpu_test::GrContextFactory::GLContextType,
236 sk_gpu_test::GrContextFactory::GLContextOptions,
236 int samples, bool diText, SkColorType colorType, SkColorProfileType profileType, 237 int samples, bool diText, SkColorType colorType, SkColorProfileType profileType,
237 bool threaded); 238 bool threaded);
238 239
239 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 240 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
240 bool serial() const override { return !fThreaded; } 241 bool serial() const override { return !fThreaded; }
241 const char* fileExtension() const override { return "png"; } 242 const char* fileExtension() const override { return "png"; }
242 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; } 243 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kGPU, SinkFl ags::kDirect }; }
243 private: 244 private:
244 GrContextFactory::GLContextType fContextType; 245 sk_gpu_test::GrContextFactory::GLContextType fContextType;
245 GrContextFactory::GLContextOptions fContextOptions; 246 sk_gpu_test::GrContextFactory::GLContextOptions fContextOptions;
246 int fSampleCount; 247 int fSampleCount;
247 bool fUseDIText; 248 bool fUseDIText;
248 SkColorType fColorType; 249 SkColorType fColorType;
249 SkColorProfileType fProfileType; 250 SkColorProfileType fProfileType;
250 bool fThreaded; 251 bool fThreaded;
251 }; 252 };
252 253
253 class PDFSink : public Sink { 254 class PDFSink : public Sink {
254 public: 255 public:
255 PDFSink(const char* rasterizer); 256 PDFSink(const char* rasterizer);
256 257
257 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 258 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
258 const char* fileExtension() const override { return "pdf"; } 259 const char* fileExtension() const override { return "pdf"; }
259 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; } 260 SinkFlags flags() const override { return SinkFlags{ SinkFlags::kVector, Sin kFlags::kDirect }; }
260 private: 261 private:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 375
375 class ViaMojo : public Via { 376 class ViaMojo : public Via {
376 public: 377 public:
377 explicit ViaMojo(Sink* sink) : Via(sink) {} 378 explicit ViaMojo(Sink* sink) : Via(sink) {}
378 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 379 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
379 }; 380 };
380 381
381 } // namespace DM 382 } // namespace DM
382 383
383 #endif//DMSrcSink_DEFINED 384 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DMGpuSupport.h ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698