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

Unified Diff: gm/imageblurtiled.cpp

Issue 233933002: when getClipBounds returns false, the out-param is uninitialized (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imageblurtiled.cpp
diff --git a/gm/imageblurtiled.cpp b/gm/imageblurtiled.cpp
index c3bcab998b8d746b4c74ea134c0db8c3a8126e7e..7200b1b418119b6009198b67ca184dddcabe7194 100644
--- a/gm/imageblurtiled.cpp
+++ b/gm/imageblurtiled.cpp
@@ -34,7 +34,9 @@ protected:
paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref();
const SkScalar tile_size = SkIntToScalar(128);
SkRect bounds;
- canvas->getClipBounds(&bounds);
+ if (!canvas->getClipBounds(&bounds)) {
+ bounds.setEmpty();
+ }
for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tile_size) {
for (SkScalar x = bounds.left(); x < bounds.right(); x += tile_size) {
canvas->save();
« 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