Commit f70f5c93 authored by fmalita@chromium.org's avatar fmalita@chromium.org

Remove SkiaBenchmarking bitmap size limits.

Some websites can easily blow through the current 4096 limit. Instead of
imposing an arbitrary limit, let Skia attempt to allocate and handle
potential failures.

BUG=338865
R=nduca@chromium.org,pdr@chromium.org,piman@chromium.org

Review URL: https://codereview.chromium.org/145243005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248627 0039d316-1c4b-4281-b951-d872f2087c98
parent 39f36b02
...@@ -153,14 +153,10 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) { ...@@ -153,14 +153,10 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) {
clip.Scale(scale); clip.Scale(scale);
gfx::Rect snapped_clip = gfx::ToEnclosingRect(clip); gfx::Rect snapped_clip = gfx::ToEnclosingRect(clip);
const int kMaxBitmapSize = 4096;
if (snapped_clip.width() > kMaxBitmapSize ||
snapped_clip.height() > kMaxBitmapSize)
return;
SkBitmap bitmap; SkBitmap bitmap;
bitmap.setConfig( if (!bitmap.setConfig(SkBitmap::kARGB_8888_Config, snapped_clip.width(),
SkBitmap::kARGB_8888_Config, snapped_clip.width(), snapped_clip.height()); snapped_clip.height()))
return;
if (!bitmap.allocPixels()) if (!bitmap.allocPixels())
return; return;
bitmap.eraseARGB(0, 0, 0, 0); bitmap.eraseARGB(0, 0, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment