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

Unified Diff: content/renderer/skia_benchmarking_extension.cc

Issue 145243005: Remove SkiaBenchmarking bitmap size limits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: 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);
« 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