From 7484d206685fedf03ec43d92b1caa9edbdefd535 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Tue, 3 Jul 2018 09:09:08 -0400 Subject: Fix empty stroked oval handling in GrRenderTargetContext::drawOval The fix in https://skia-review.googlesource.com/c/skia/+/138932 (Don't reject stroked empty rrects in GPU backend) revealed a similar bug in oval drawing. Bug: skia:8115 Change-Id: I2f864daf2ccabdcdbb49b242cc5ce3682fe7b12a Reviewed-on: https://skia-review.googlesource.com/139120 Reviewed-by: Jim Van Verth Commit-Queue: Robert Phillips --- src/gpu/GrRenderTargetContext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index b2b6e99e69..b6a9b5a78b 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -1305,7 +1305,14 @@ void GrRenderTargetContext::drawOval(const GrClip& clip, SkDEBUGCODE(this->validate();) GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "drawOval", fContext); + const SkStrokeRec& stroke = style.strokeRec(); + if (oval.isEmpty() && !style.pathEffect()) { + if (stroke.getStyle() == SkStrokeRec::kFill_Style) { + return; + } + + this->drawRect(clip, std::move(paint), aa, viewMatrix, oval, &style); return; } -- cgit v1.2.3