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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 ConvolveHorizontallyNoAlpha( | 452 ConvolveHorizontallyNoAlpha( |
453 &sourceData[(uint64_t)nextXRow * sourceByteRowStride ], | 453 &sourceData[(uint64_t)nextXRow * sourceByteRowStride ], |
454 filterX, rowBuffer.advanceRow()); | 454 filterX, rowBuffer.advanceRow()); |
455 } | 455 } |
456 } | 456 } |
457 nextXRow++; | 457 nextXRow++; |
458 } | 458 } |
459 } | 459 } |
460 | 460 |
461 // Compute where in the output image this row of final data will go. | 461 // Compute where in the output image this row of final data will go. |
462 unsigned char* curOutputRow = &output[outY * outputByteRowStride]; | 462 unsigned char* curOutputRow = &output[(uint64_t)outY * outputByteRowStri de]; |
reed1
2014/07/07 13:16:40
future note: sk_64_mul() was written to for this s
| |
463 | 463 |
464 // Get the list of rows that the circular buffer has, in order. | 464 // Get the list of rows that the circular buffer has, in order. |
465 int firstRowInCircularBuffer; | 465 int firstRowInCircularBuffer; |
466 unsigned char* const* rowsToConvolve = | 466 unsigned char* const* rowsToConvolve = |
467 rowBuffer.GetRowAddresses(&firstRowInCircularBuffer); | 467 rowBuffer.GetRowAddresses(&firstRowInCircularBuffer); |
468 | 468 |
469 // Now compute the start of the subset of those rows that the filter | 469 // Now compute the start of the subset of those rows that the filter |
470 // needs. | 470 // needs. |
471 unsigned char* const* firstRowForFilter = | 471 unsigned char* const* firstRowForFilter = |
472 &rowsToConvolve[filterOffset - firstRowInCircularBuffer]; | 472 &rowsToConvolve[filterOffset - firstRowInCircularBuffer]; |
473 | 473 |
474 if (convolveProcs.fConvolveVertically) { | 474 if (convolveProcs.fConvolveVertically) { |
475 convolveProcs.fConvolveVertically(filterValues, filterLength, | 475 convolveProcs.fConvolveVertically(filterValues, filterLength, |
476 firstRowForFilter, | 476 firstRowForFilter, |
477 filterX.numValues(), curOutputRow , | 477 filterX.numValues(), curOutputRow , |
478 sourceHasAlpha); | 478 sourceHasAlpha); |
479 } else { | 479 } else { |
480 ConvolveVertically(filterValues, filterLength, | 480 ConvolveVertically(filterValues, filterLength, |
481 firstRowForFilter, | 481 firstRowForFilter, |
482 filterX.numValues(), curOutputRow, | 482 filterX.numValues(), curOutputRow, |
483 sourceHasAlpha); | 483 sourceHasAlpha); |
484 } | 484 } |
485 } | 485 } |
486 } | 486 } |
OLD | NEW |