diff options
author | Robert Phillips <robertphillips@google.com> | 2018-07-03 09:09:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-03 13:50:43 +0000 |
commit | 7484d206685fedf03ec43d92b1caa9edbdefd535 (patch) | |
tree | 02de4ea678fd228e9acf0e8a9dcab89f0689cd7b | |
parent | ff2181e62e79ffd2ce628fc8c05b5457d4f54163 (diff) |
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 <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | src/gpu/GrRenderTargetContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |