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

Unified Diff: skia/ext/platform_canvas.cc

Issue 7686006: Fix crash when allocation of very large HTML canvas fails. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « skia/ext/platform_canvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
===================================================================
--- skia/ext/platform_canvas.cc (revision 97133)
+++ skia/ext/platform_canvas.cc (working copy)
@@ -34,6 +34,15 @@
return new PlatformCanvas(width, height, is_opaque);
}
+SkCanvas* TryCreateBitmapCanvas(int width, int height, bool is_opaque) {
alokp 2011/08/19 15:34:39 Couldn't you change the existing function to retur
junov1 2011/08/19 15:50:25 There are many places that currently call CreateBi
+ PlatformCanvas* canvas = new PlatformCanvas();
+ if (!canvas->initialize(width, height, is_opaque)) {
+ delete canvas;
+ canvas = NULL;
+ }
+ return canvas;
+}
+
SkDevice* GetTopDevice(const SkCanvas& canvas) {
SkCanvas::LayerIter iter(const_cast<SkCanvas*>(&canvas), false);
return iter.device();
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698