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

Unified Diff: src/core/SkConvolver.cpp

Issue 323013005: Support for larger than "signed 32b limit" sized bitmaps in BGRAConvolve2D. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkConvolver.cpp
diff --git a/src/core/SkConvolver.cpp b/src/core/SkConvolver.cpp
index 7666e6fadc99ac3b161403c91bee35fa0fdbe529..0e97fac07ffc5083cad6d045247c37e388428cd6 100644
--- a/src/core/SkConvolver.cpp
+++ b/src/core/SkConvolver.cpp
@@ -405,7 +405,7 @@ void BGRAConvolve2D(const unsigned char* sourceData,
const unsigned char* src[4];
unsigned char* outRow[4];
for (int i = 0; i < 4; ++i) {
- src[i] = &sourceData[(nextXRow + i) * sourceByteRowStride];
+ src[i] = &sourceData[(uint64_t)(nextXRow + i) * sourceByteRowStride];
outRow[i] = rowBuffer.advanceRow();
}
convolveProcs.fConvolve4RowsHorizontally(src, filterX, outRow);
@@ -416,16 +416,16 @@ void BGRAConvolve2D(const unsigned char* sourceData,
nextXRow < lastFilterOffset + lastFilterLength -
avoidSimdRows) {
convolveProcs.fConvolveHorizontally(
- &sourceData[nextXRow * sourceByteRowStride],
+ &sourceData[(uint64_t)nextXRow * sourceByteRowStride],
filterX, rowBuffer.advanceRow(), sourceHasAlpha);
} else {
if (sourceHasAlpha) {
ConvolveHorizontally<true>(
- &sourceData[nextXRow * sourceByteRowStride],
+ &sourceData[(uint64_t)nextXRow * sourceByteRowStride],
filterX, rowBuffer.advanceRow());
} else {
ConvolveHorizontally<false>(
- &sourceData[nextXRow * sourceByteRowStride],
+ &sourceData[(uint64_t)nextXRow * sourceByteRowStride],
filterX, rowBuffer.advanceRow());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698