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 23 matching lines...) Expand all Loading... |
34 // You may write to either the bitmap or stream. | 34 // You may write to either the bitmap or stream. |
35 virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*)
const | 35 virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*)
const |
36 = 0; | 36 = 0; |
37 // Sinks in the same enclave (except kAnyThread_Enclave) will run serially o
n the same thread. | 37 // Sinks in the same enclave (except kAnyThread_Enclave) will run serially o
n the same thread. |
38 virtual int enclave() const = 0; | 38 virtual int enclave() const = 0; |
39 | 39 |
40 // File extension for the content draw() outputs, e.g. "png", "pdf". | 40 // File extension for the content draw() outputs, e.g. "png", "pdf". |
41 virtual const char* fileExtension() const = 0; | 41 virtual const char* fileExtension() const = 0; |
42 }; | 42 }; |
43 | 43 |
44 enum { kAnyThread_Enclave, kGPUSink_Enclave, kPDFSink_Enclave }; | 44 enum { kAnyThread_Enclave, kGPU_Enclave, kPDFSink_Enclave }; |
45 static const int kNumEnclaves = kPDFSink_Enclave + 1; | 45 static const int kNumEnclaves = kPDFSink_Enclave + 1; |
46 | 46 |
47 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 47 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
48 | 48 |
49 class GMSrc : public Src { | 49 class GMSrc : public Src { |
50 public: | 50 public: |
51 explicit GMSrc(skiagm::GMRegistry::Factory); | 51 explicit GMSrc(skiagm::GMRegistry::Factory); |
52 | 52 |
53 Error draw(SkCanvas*) const SK_OVERRIDE; | 53 Error draw(SkCanvas*) const SK_OVERRIDE; |
54 SkISize size() const SK_OVERRIDE; | 54 SkISize size() const SK_OVERRIDE; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } | 162 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(
); } |
163 private: | 163 private: |
164 const int fW, fH; | 164 const int fW, fH; |
165 SkAutoTDelete<SkBBHFactory> fFactory; | 165 SkAutoTDelete<SkBBHFactory> fFactory; |
166 SkAutoTDelete<Sink> fSink; | 166 SkAutoTDelete<Sink> fSink; |
167 }; | 167 }; |
168 | 168 |
169 } // namespace DM | 169 } // namespace DM |
170 | 170 |
171 #endif//DMSrcSink_DEFINED | 171 #endif//DMSrcSink_DEFINED |
OLD | NEW |