Index: content/renderer/skia_benchmarking_extension.cc |
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc |
index 3f947915dccb22baa69e3f83aa2f917561ea8a2c..7e8979a5ac97b4fe8f50075fdc5a183ad1fe6e43 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); |