summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorfmalita@chromium.org <fmalita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-04 00:24:35 +0000
committerfmalita@chromium.org <fmalita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-04 00:24:35 +0000
commitf70f5c9368e1de24dd126fc01f01268f4004ec60 (patch)
tree0a03d7472d5d09d698678c9ec4bba1daa80c2e97 /content/renderer
parent39f36b02f0f2db85edfed87b1146590caca81e2e (diff)
downloadchromium_src-f70f5c9368e1de24dd126fc01f01268f4004ec60.zip
chromium_src-f70f5c9368e1de24dd126fc01f01268f4004ec60.tar.gz
chromium_src-f70f5c9368e1de24dd126fc01f01268f4004ec60.tar.bz2
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
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/skia_benchmarking_extension.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index 3f94791..7e8979a 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -153,14 +153,10 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) {
clip.Scale(scale);
gfx::Rect snapped_clip = gfx::ToEnclosingRect(clip);
- const int kMaxBitmapSize = 4096;
- if (snapped_clip.width() > kMaxBitmapSize ||
- snapped_clip.height() > kMaxBitmapSize)
- return;
-
SkBitmap bitmap;
- bitmap.setConfig(
- SkBitmap::kARGB_8888_Config, snapped_clip.width(), snapped_clip.height());
+ if (!bitmap.setConfig(SkBitmap::kARGB_8888_Config, snapped_clip.width(),
+ snapped_clip.height()))
+ return;
if (!bitmap.allocPixels())
return;
bitmap.eraseARGB(0, 0, 0, 0);