Commit f9d3e02f authored by junov's avatar junov Committed by Commit bot

Fix use of uninitialized memory in skia/ext/analysis_canvas.cc

BUG=475106

Review URL: https://codereview.chromium.org/1065353002

Cr-Commit-Position: refs/heads/master@{#324294}
parent c4f9aab6
......@@ -60,7 +60,9 @@ bool IsFullQuad(SkCanvas* canvas, const SkRect& drawn_rect) {
return false;
SkIRect clip_irect;
canvas->getClipDeviceBounds(&clip_irect);
if (!canvas->getClipDeviceBounds(&clip_irect))
return false;
// if the clip is smaller than the canvas, we're partly clipped, so abort.
if (!clip_irect.contains(SkIRect::MakeSize(canvas->getDeviceSize())))
return false;
......@@ -96,8 +98,8 @@ void AnalysisCanvas::SetForceNotTransparent(bool flag) {
void AnalysisCanvas::onDrawPaint(const SkPaint& paint) {
SkRect rect;
getClipBounds(&rect);
drawRect(rect, paint);
if (getClipBounds(&rect))
drawRect(rect, paint);
}
void AnalysisCanvas::onDrawPoints(SkCanvas::PointMode mode,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment