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

Unified Diff: Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 540033002: use tryAllocPixels to check the result, allocPixels to require success (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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
« no previous file with comments | « Source/platform/graphics/ImageLayerChromiumTest.cpp ('k') | Source/platform/image-decoders/ImageFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp
index f82960d498e68070033272f1df00780b93e59668..ef349001ef2377de78cb5a94b580bd712aeb6ef4 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -953,7 +953,7 @@ void DrawingBuffer::paintFramebufferToCanvas(int framebuffer, int width, int hei
// pixel data. We will then use Skia to rescale this bitmap to
// the size of the canvas's backing store.
if (m_resizingBitmap.width() != width || m_resizingBitmap.height() != height) {
- if (!m_resizingBitmap.allocN32Pixels(width, height))
+ if (!m_resizingBitmap.tryAllocN32Pixels(width, height))
return;
}
readbackBitmap = &m_resizingBitmap;
« no previous file with comments | « Source/platform/graphics/ImageLayerChromiumTest.cpp ('k') | Source/platform/image-decoders/ImageFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698