OLD | NEW |
1 | 1 |
2 #include "SkTestImageFilters.h" | 2 #include "SkTestImageFilters.h" |
3 #include "SkCanvas.h" | 3 #include "SkCanvas.h" |
4 #include "SkDevice.h" | 4 #include "SkDevice.h" |
5 #include "SkReadBuffer.h" | 5 #include "SkReadBuffer.h" |
6 #include "SkWriteBuffer.h" | 6 #include "SkWriteBuffer.h" |
7 | 7 |
8 // Simple helper canvas that "takes ownership" of the provided device, so that | 8 // Simple helper canvas that "takes ownership" of the provided device, so that |
9 // when this canvas goes out of scope, so will its device. Could be replaced | 9 // when this canvas goes out of scope, so will its device. Could be replaced |
10 // with the following: | 10 // with the following: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 SkFlattenable* SkDownSampleImageFilter::CreateProc(SkReadBuffer& buffer) { | 74 SkFlattenable* SkDownSampleImageFilter::CreateProc(SkReadBuffer& buffer) { |
75 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); | 75 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
76 return Create(buffer.readScalar(), common.getInput(0)); | 76 return Create(buffer.readScalar(), common.getInput(0)); |
77 } | 77 } |
78 | 78 |
79 void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const { | 79 void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const { |
80 this->INHERITED::flatten(buffer); | 80 this->INHERITED::flatten(buffer); |
81 buffer.writeScalar(fScale); | 81 buffer.writeScalar(fScale); |
82 } | 82 } |
| 83 |
| 84 #ifndef SK_IGNORE_TO_STRING |
| 85 void SkDownSampleImageFilter::toString(SkString* str) const { |
| 86 str->appendf("SkDownSampleImageFilter: ("); |
| 87 str->append(")"); |
| 88 } |
| 89 #endif |
OLD | NEW |