OLD | NEW |
1 #ifndef DMSrcSink_DEFINED | 1 #ifndef DMSrcSink_DEFINED |
2 #define DMSrcSink_DEFINED | 2 #define DMSrcSink_DEFINED |
3 | 3 |
4 #include "DMGpuSupport.h" | 4 #include "DMGpuSupport.h" |
5 #include "SkBBHFactory.h" | 5 #include "SkBBHFactory.h" |
6 #include "SkBBoxHierarchy.h" | 6 #include "SkBBoxHierarchy.h" |
7 #include "SkBitmap.h" | 7 #include "SkBitmap.h" |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkGPipe.h" | 10 #include "SkGPipe.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 Name name() const SK_OVERRIDE; | 83 Name name() const SK_OVERRIDE; |
84 private: | 84 private: |
85 SkString fPath; | 85 SkString fPath; |
86 SkLazyPtr<SkPicture, SafeUnref> fPic; | 86 SkLazyPtr<SkPicture, SafeUnref> fPic; |
87 }; | 87 }; |
88 | 88 |
89 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 89 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
90 | 90 |
91 class GPUSink : public Sink { | 91 class GPUSink : public Sink { |
92 public: | 92 public: |
93 GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfT
ext); | 93 GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfT
ext, bool threaded); |
94 | 94 |
95 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; | 95 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; |
96 int enclave() const SK_OVERRIDE; | 96 int enclave() const SK_OVERRIDE; |
97 const char* fileExtension() const SK_OVERRIDE { return "png"; } | 97 const char* fileExtension() const SK_OVERRIDE { return "png"; } |
98 private: | 98 private: |
99 GrContextFactory::GLContextType fContextType; | 99 GrContextFactory::GLContextType fContextType; |
100 GrGLStandard fGpuAPI; | 100 GrGLStandard fGpuAPI; |
101 int fSampleCount; | 101 int fSampleCount; |
102 bool fUseDFText; | 102 bool fUseDFText; |
| 103 bool fThreaded; |
103 }; | 104 }; |
104 | 105 |
105 class PDFSink : public Sink { | 106 class PDFSink : public Sink { |
106 public: | 107 public: |
107 PDFSink(); | 108 PDFSink(); |
108 | 109 |
109 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; | 110 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; |
110 int enclave() const SK_OVERRIDE { return kPDFSink_Enclave; } | 111 int enclave() const SK_OVERRIDE { return kPDFSink_Enclave; } |
111 const char* fileExtension() const SK_OVERRIDE { return "pdf"; } | 112 const char* fileExtension() const SK_OVERRIDE { return "pdf"; } |
112 }; | 113 }; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } | 169 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } |
169 private: | 170 private: |
170 const int fW, fH; | 171 const int fW, fH; |
171 SkAutoTDelete<SkBBHFactory> fFactory; | 172 SkAutoTDelete<SkBBHFactory> fFactory; |
172 SkAutoTDelete<Sink> fSink; | 173 SkAutoTDelete<Sink> fSink; |
173 }; | 174 }; |
174 | 175 |
175 } // namespace DM | 176 } // namespace DM |
176 | 177 |
177 #endif//DMSrcSink_DEFINED | 178 #endif//DMSrcSink_DEFINED |
OLD | NEW |