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

Unified Diff: src/core/SkPictureShader.cpp

Issue 998423004: Lower SkPictureShader tile size limits (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 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 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/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 17d1289c0ad31e08b78f996b655c1ae99d69eab1..776fe5e6556aa0c0b6ab846f73ffef787cecdc8f 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -160,8 +160,8 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri
SkSize scaledSize = SkSize::Make(SkScalarAbs(scale.x() * fTile.width()),
SkScalarAbs(scale.y() * fTile.height()));
- // Clamp the tile size to about 16M pixels
- static const SkScalar kMaxTileArea = 4096 * 4096;
+ // Clamp the tile size to about 4M pixels
+ static const SkScalar kMaxTileArea = 2048 * 2048;
SkScalar tileArea = SkScalarMul(scaledSize.width(), scaledSize.height());
if (tileArea > kMaxTileArea) {
SkScalar clampScale = SkScalarSqrt(SkScalarDiv(kMaxTileArea, tileArea));
« 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