| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "SkConvolver.h" | 5 #include "SkConvolver.h" |
| 6 #include "SkSize.h" | 6 #include "SkSize.h" |
| 7 #include "SkTypes.h" | 7 #include "SkTypes.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 const SkConvolutionFilter1D::ConvolutionFixed* SkConvolutionFilter1D::GetSingleF
ilter( | 346 const SkConvolutionFilter1D::ConvolutionFixed* SkConvolutionFilter1D::GetSingleF
ilter( |
| 347 int* specifiedFilterlength, | 347 int* specifiedFilterlength, |
| 348 int* filterOffset, | 348 int* filterOffset, |
| 349 int* filterLength) const { | 349 int* filterLength) const { |
| 350 const FilterInstance& filter = fFilters[0]; | 350 const FilterInstance& filter = fFilters[0]; |
| 351 *filterOffset = filter.fOffset; | 351 *filterOffset = filter.fOffset; |
| 352 *filterLength = filter.fTrimmedLength; | 352 *filterLength = filter.fTrimmedLength; |
| 353 *specifiedFilterlength = filter.fLength; | 353 *specifiedFilterlength = filter.fLength; |
| 354 if (filter.fTrimmedLength == 0) { | 354 if (filter.fTrimmedLength == 0) { |
| 355 return NULL; | 355 return nullptr; |
| 356 } | 356 } |
| 357 | 357 |
| 358 return &fFilterValues[filter.fDataLocation]; | 358 return &fFilterValues[filter.fDataLocation]; |
| 359 } | 359 } |
| 360 | 360 |
| 361 void BGRAConvolve2D(const unsigned char* sourceData, | 361 void BGRAConvolve2D(const unsigned char* sourceData, |
| 362 int sourceByteRowStride, | 362 int sourceByteRowStride, |
| 363 bool sourceHasAlpha, | 363 bool sourceHasAlpha, |
| 364 const SkConvolutionFilter1D& filterX, | 364 const SkConvolutionFilter1D& filterX, |
| 365 const SkConvolutionFilter1D& filterY, | 365 const SkConvolutionFilter1D& filterY, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 filterX.numValues(), curOutputRow
, | 480 filterX.numValues(), curOutputRow
, |
| 481 sourceHasAlpha); | 481 sourceHasAlpha); |
| 482 } else { | 482 } else { |
| 483 ConvolveVertically(filterValues, filterLength, | 483 ConvolveVertically(filterValues, filterLength, |
| 484 firstRowForFilter, | 484 firstRowForFilter, |
| 485 filterX.numValues(), curOutputRow, | 485 filterX.numValues(), curOutputRow, |
| 486 sourceHasAlpha); | 486 sourceHasAlpha); |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 } | 489 } |
| OLD | NEW |