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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 556463002: Revert of tryAllocPixels returns bool, allocPixels requires success (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index f943dd2ded246a9a5493b894aab2a602a4c15656..b468978b9ce9f32bb1b0f9c4763ddbf9167ac00d 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -575,10 +575,10 @@
base::Bind(callback, false, SkBitmap()));
scoped_ptr<SkBitmap> bitmap(new SkBitmap);
- if (!bitmap->tryAllocPixels(SkImageInfo::Make(dst_size_in_pixel.width(),
- dst_size_in_pixel.height(),
- color_type,
- kOpaque_SkAlphaType)))
+ if (!bitmap->allocPixels(SkImageInfo::Make(dst_size_in_pixel.width(),
+ dst_size_in_pixel.height(),
+ color_type,
+ kOpaque_SkAlphaType)))
return;
ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
@@ -649,7 +649,7 @@
DCHECK_EQ(scaled_bitmap.colorType(), kN32_SkColorType);
// Paint |scaledBitmap| to alpha-only |grayscale_bitmap|.
SkBitmap grayscale_bitmap;
- bool success = grayscale_bitmap.tryAllocPixels(
+ bool success = grayscale_bitmap.allocPixels(
SkImageInfo::MakeA8(scaled_bitmap.width(), scaled_bitmap.height()));
if (!success) {
callback.Run(false, SkBitmap());

Powered by Google App Engine
This is Rietveld 408576698