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) { ...@@ -60,7 +60,9 @@ bool IsFullQuad(SkCanvas* canvas, const SkRect& drawn_rect) {
return false; return false;
SkIRect clip_irect; 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 the clip is smaller than the canvas, we're partly clipped, so abort.
if (!clip_irect.contains(SkIRect::MakeSize(canvas->getDeviceSize()))) if (!clip_irect.contains(SkIRect::MakeSize(canvas->getDeviceSize())))
return false; return false;
...@@ -96,7 +98,7 @@ void AnalysisCanvas::SetForceNotTransparent(bool flag) { ...@@ -96,7 +98,7 @@ void AnalysisCanvas::SetForceNotTransparent(bool flag) {
void AnalysisCanvas::onDrawPaint(const SkPaint& paint) { void AnalysisCanvas::onDrawPaint(const SkPaint& paint) {
SkRect rect; SkRect rect;
getClipBounds(&rect); if (getClipBounds(&rect))
drawRect(rect, paint); drawRect(rect, paint);
} }
......
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