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

Unified Diff: skia/effects/SkEmbossMaskFilter.cpp

Issue 93093: Implement canvas's globalCompositeOperation lighter properly.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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/effects/SkBlurMask.cpp ('k') | skia/effects/SkKernel33MaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/effects/SkEmbossMaskFilter.cpp
===================================================================
--- skia/effects/SkEmbossMaskFilter.cpp (revision 14480)
+++ skia/effects/SkEmbossMaskFilter.cpp (working copy)
@@ -88,7 +88,9 @@
{
uint8_t* alphaPlane = dst->fImage;
size_t planeSize = dst->computeImageSize();
-
+ if (0 == planeSize) {
+ return false; // too big to allocate, abort
+ }
dst->fImage = SkMask::AllocImage(planeSize * 3);
memcpy(dst->fImage, alphaPlane, planeSize);
SkMask::FreeImage(alphaPlane);
« no previous file with comments | « skia/effects/SkBlurMask.cpp ('k') | skia/effects/SkKernel33MaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698