Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| 11 #include "DMGpuSupport.h" | 11 #include "DMGpuSupport.h" |
| 12 #include "SkBBHFactory.h" | 12 #include "SkBBHFactory.h" |
| 13 #include "SkBBoxHierarchy.h" | 13 #include "SkBBoxHierarchy.h" |
| 14 #include "SkBitmap.h" | 14 #include "SkBitmap.h" |
| 15 #include "SkBitmapRegionDecoder.h" | |
| 15 #include "SkCanvas.h" | 16 #include "SkCanvas.h" |
| 16 #include "SkCodec.h" | 17 #include "SkCodec.h" |
| 17 #include "SkData.h" | 18 #include "SkData.h" |
| 18 #include "SkGPipe.h" | 19 #include "SkGPipe.h" |
| 19 #include "SkPicture.h" | 20 #include "SkPicture.h" |
| 20 #include "gm.h" | 21 #include "gm.h" |
| 21 | 22 |
| 22 namespace DM { | 23 namespace DM { |
| 23 | 24 |
| 24 // This is just convenience. It lets you use either return "foo" or return SkSt ringPrintf(...). | 25 // This is just convenience. It lets you use either return "foo" or return SkSt ringPrintf(...). |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 | 94 |
| 94 Error draw(SkCanvas*) const override; | 95 Error draw(SkCanvas*) const override; |
| 95 SkISize size() const override; | 96 SkISize size() const override; |
| 96 Name name() const override; | 97 Name name() const override; |
| 97 void modifyGrContextOptions(GrContextOptions* options) const override; | 98 void modifyGrContextOptions(GrContextOptions* options) const override; |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 skiagm::GMRegistry::Factory fFactory; | 101 skiagm::GMRegistry::Factory fFactory; |
| 101 }; | 102 }; |
| 102 | 103 |
| 104 class BRDSrc : public Src { | |
|
scroggo
2015/08/13 16:53:07
Maybe add a description for what this is for?
msarett
2015/08/13 18:10:23
Done.
| |
| 105 public: | |
| 106 enum Mode { | |
| 107 kNormal_Mode, | |
|
scroggo
2015/08/13 16:53:07
What do these modes mean? Isn't BRD always used fo
msarett
2015/08/13 18:10:23
Maybe we don't need both of these tests or these a
scroggo
2015/08/28 13:49:43
The FullImage mode seems weird. Does it show us so
| |
| 108 kSubset_Mode, | |
| 109 }; | |
| 110 | |
| 111 BRDSrc(Path, SkBitmapRegionDecoder::Strategy, Mode, SkColorType, uint32_t); | |
| 112 | |
| 113 Error draw(SkCanvas*) const override; | |
| 114 SkISize size() const override; | |
| 115 Name name() const override; | |
| 116 bool veto(SinkFlags) const override; | |
| 117 private: | |
| 118 Path fPath; | |
| 119 SkBitmapRegionDecoder::Strategy fStrategy; | |
| 120 Mode fMode; | |
| 121 SkColorType fColorType; | |
| 122 uint32_t fSampleSize; | |
| 123 }; | |
| 124 | |
| 103 class CodecSrc : public Src { | 125 class CodecSrc : public Src { |
| 104 public: | 126 public: |
| 105 enum Mode { | 127 enum Mode { |
| 106 kNormal_Mode, | 128 kNormal_Mode, |
| 107 kScanline_Mode, | 129 kScanline_Mode, |
| 108 kScanline_Subset_Mode, | 130 kScanline_Subset_Mode, |
| 109 kStripe_Mode, // Tests the skipping of scanlines | 131 kStripe_Mode, // Tests the skipping of scanlines |
| 110 kSubset_Mode, // For codecs that support subsets directly. | 132 kSubset_Mode, // For codecs that support subsets directly. |
| 111 }; | 133 }; |
| 112 enum DstColorType { | 134 enum DstColorType { |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 | 331 |
| 310 class ViaTwice : public Via { | 332 class ViaTwice : public Via { |
| 311 public: | 333 public: |
| 312 explicit ViaTwice(Sink* sink) : Via(sink) {} | 334 explicit ViaTwice(Sink* sink) : Via(sink) {} |
| 313 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 335 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 314 }; | 336 }; |
| 315 | 337 |
| 316 } // namespace DM | 338 } // namespace DM |
| 317 | 339 |
| 318 #endif//DMSrcSink_DEFINED | 340 #endif//DMSrcSink_DEFINED |
| OLD | NEW |