Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: src/effects/SkTestImageFilters.cpp

Issue 12469002: Removed unused parameters (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkFlattenableBuffers.h" 5 #include "SkFlattenableBuffers.h"
6 6
7 // Simple helper canvas that "takes ownership" of the provided device, so that 7 // Simple helper canvas that "takes ownership" of the provided device, so that
8 // when this canvas goes out of scope, so will its device. Could be replaced 8 // when this canvas goes out of scope, so will its device. Could be replaced
9 // with the following: 9 // with the following:
10 // 10 //
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return inner->filterBounds(src, ctm, &tmp) && 62 return inner->filterBounds(src, ctm, &tmp) &&
63 outer->filterBounds(tmp, ctm, dst); 63 outer->filterBounds(tmp, ctm, dst);
64 } 64 }
65 65
66 SkComposeImageFilter::SkComposeImageFilter(SkFlattenableReadBuffer& buffer) : IN HERITED(buffer) { 66 SkComposeImageFilter::SkComposeImageFilter(SkFlattenableReadBuffer& buffer) : IN HERITED(buffer) {
67 } 67 }
68 68
69 /////////////////////////////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////////////////////////////
70 70
71 bool SkDownSampleImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, 71 bool SkDownSampleImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
72 const SkMatrix& matrix, 72 const SkMatrix&,
73 SkBitmap* result, SkIPoint*) { 73 SkBitmap* result, SkIPoint*) {
74 SkScalar scale = fScale; 74 SkScalar scale = fScale;
75 if (scale > SK_Scalar1 || scale <= 0) { 75 if (scale > SK_Scalar1 || scale <= 0) {
76 return false; 76 return false;
77 } 77 }
78 78
79 int dstW = SkScalarRoundToInt(src.width() * scale); 79 int dstW = SkScalarRoundToInt(src.width() * scale);
80 int dstH = SkScalarRoundToInt(src.height() * scale); 80 int dstH = SkScalarRoundToInt(src.height() * scale);
81 if (dstW < 1) { 81 if (dstW < 1) {
82 dstW = 1; 82 dstW = 1;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 void SkDownSampleImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const { 121 void SkDownSampleImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {
122 this->INHERITED::flatten(buffer); 122 this->INHERITED::flatten(buffer);
123 123
124 buffer.writeScalar(fScale); 124 buffer.writeScalar(fScale);
125 } 125 }
126 126
127 SkDownSampleImageFilter::SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer ) : INHERITED(buffer) { 127 SkDownSampleImageFilter::SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer ) : INHERITED(buffer) {
128 fScale = buffer.readScalar(); 128 fScale = buffer.readScalar();
129 } 129 }
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698