Chromium Code Reviews| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 | 54 |
| 55 Error draw(SkCanvas*) const SK_OVERRIDE; | 55 Error draw(SkCanvas*) const SK_OVERRIDE; |
| 56 SkISize size() const SK_OVERRIDE; | 56 SkISize size() const SK_OVERRIDE; |
| 57 Name name() const SK_OVERRIDE; | 57 Name name() const SK_OVERRIDE; |
| 58 private: | 58 private: |
| 59 skiagm::GMRegistry::Factory fFactory; | 59 skiagm::GMRegistry::Factory fFactory; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class ImageSrc : public Src { | 62 class ImageSrc : public Src { |
| 63 public: | 63 public: |
| 64 explicit ImageSrc(Path path, int subsets = 0); | 64 // divisor == 0 means decode the whole image |
| 65 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr id. | |
| 66 explicit ImageSrc(Path path, int divisor = 0); | |
| 65 | 67 |
| 66 Error draw(SkCanvas*) const SK_OVERRIDE; | 68 Error draw(SkCanvas*) const SK_OVERRIDE; |
| 67 SkISize size() const SK_OVERRIDE; | 69 SkISize size() const SK_OVERRIDE; |
| 68 Name name() const SK_OVERRIDE; | 70 Name name() const SK_OVERRIDE; |
| 69 private: | 71 private: |
| 70 Path fPath; | 72 Path fPath; |
|
scroggo
2015/01/30 21:15:09
The other CL made this const. Is it deliberately n
mtklein
2015/01/30 21:16:42
Oh no, not really. It doesn't make much of a diff
| |
| 71 int fSubsets; | 73 const int fDivisor; |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 class SKPSrc : public Src { | 76 class SKPSrc : public Src { |
| 75 public: | 77 public: |
| 76 explicit SKPSrc(Path path); | 78 explicit SKPSrc(Path path); |
| 77 | 79 |
| 78 Error draw(SkCanvas*) const SK_OVERRIDE; | 80 Error draw(SkCanvas*) const SK_OVERRIDE; |
| 79 SkISize size() const SK_OVERRIDE; | 81 SkISize size() const SK_OVERRIDE; |
| 80 Name name() const SK_OVERRIDE; | 82 Name name() const SK_OVERRIDE; |
| 81 private: | 83 private: |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 Error draw(const Src& src, SkBitmap*, SkWStream* out) const SK_OVERRIDE { | 184 Error draw(const Src& src, SkBitmap*, SkWStream* out) const SK_OVERRIDE { |
| 183 return src.draw(SkCreateNullCanvas()); | 185 return src.draw(SkCreateNullCanvas()); |
| 184 } | 186 } |
| 185 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } | 187 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } |
| 186 const char* fileExtension() const SK_OVERRIDE { return ""; } | 188 const char* fileExtension() const SK_OVERRIDE { return ""; } |
| 187 }; | 189 }; |
| 188 | 190 |
| 189 } // namespace DM | 191 } // namespace DM |
| 190 | 192 |
| 191 #endif//DMSrcSink_DEFINED | 193 #endif//DMSrcSink_DEFINED |
| OLD | NEW |