| Index: src/core/SkBitmapProcShader.cpp
|
| diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
|
| index 972d73173fc4847b82fede1480f7dafaf9a7fc9a..e7e2e11d97f8abbb9fe6e5bdef96526f2147ed23 100644
|
| --- a/src/core/SkBitmapProcShader.cpp
|
| +++ b/src/core/SkBitmapProcShader.cpp
|
| @@ -303,6 +303,16 @@ bool SkBitmapProcShader::isOpaque() const {
|
| return fRawBitmap.isOpaque();
|
| }
|
|
|
| +bool SkBitmapProcShader::bitmapIsTooBig(const SkBitmap& bm) {
|
| + // SkBitmapProcShader stores bitmap coordinates in a 16bit buffer, as it
|
| + // communicates between its matrix-proc and its sampler-proc. Until we can
|
| + // widen that, we have to reject bitmaps that are larger.
|
| + //
|
| + static const int kMaxSize = 65535;
|
| +
|
| + return bm.width() > kMaxSize || bm.height() > kMaxSize;
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
| #include "SkUnPreMultiply.h"
|
|
|