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

Issue 2017313002: Add SkPathPriv::IsSimpleClosedRect (Closed)

Created:
4 years, 6 months ago by bsalomon
Modified:
4 years, 6 months ago
Reviewers:
robertphillips
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@fixaddarc
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add SkPathPriv::IsSimpleClosedRect This function looks for "simple" rect paths. Simple here means begins and ends at a corner and is closed (either manually or with a close verb). Unlike SkPath::isRect this returns the starting point index (using the same start indexing scheme as SkPath::addRect). GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2017313002 Committed: https://skia.googlesource.com/skia/+/edc743a57657107b873ed2fc2efeeff1b1efcd23

Patch Set 1 #

Patch Set 2 : working #

Patch Set 3 : cleanup #

Total comments: 6

Patch Set 4 : Address comments #

Patch Set 5 : fix gcc warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -0 lines) Patch
M src/core/SkPath.cpp View 1 2 3 1 chunk +121 lines, -0 lines 0 comments Download
M src/core/SkPathPriv.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M tests/PathTest.cpp View 1 2 3 4 2 chunks +98 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
bsalomon
I started going down the route of modifying SkPath::isRect. However, that function is pretty complicated ...
4 years, 6 months ago (2016-05-31 19:40:47 UTC) #4
robertphillips
lgtm https://codereview.chromium.org/2017313002/diff/40001/src/core/SkPath.cpp File src/core/SkPath.cpp (right): https://codereview.chromium.org/2017313002/diff/40001/src/core/SkPath.cpp#newcode3250 src/core/SkPath.cpp:3250: unsigned* start) { Would it be worth having ...
4 years, 6 months ago (2016-05-31 21:48:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2017313002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2017313002/60001
4 years, 6 months ago (2016-06-01 15:57:33 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot/builds/3888)
4 years, 6 months ago (2016-06-01 16:01:29 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2017313002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2017313002/80001
4 years, 6 months ago (2016-06-01 16:24:48 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://skia.googlesource.com/skia/+/edc743a57657107b873ed2fc2efeeff1b1efcd23
4 years, 6 months ago (2016-06-01 16:42:34 UTC) #15
bsalomon
4 years, 6 months ago (2016-06-03 14:49:06 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/2017313002/diff/40001/src/core/SkPath.cpp
File src/core/SkPath.cpp (right):

https://codereview.chromium.org/2017313002/diff/40001/src/core/SkPath.cpp#new...
src/core/SkPath.cpp:3250: unsigned* start) {
On 2016/05/31 21:48:36, robertphillips wrote:
> Would it be worth having a quick out for is there were any quads, cubics or
> conics in the segment mask?

Done.

https://codereview.chromium.org/2017313002/diff/40001/src/core/SkPath.cpp#new...
src/core/SkPath.cpp:3281: }
On 2016/05/31 21:48:36, robertphillips wrote:
> Don't we just want to say "if (rectPtCnt < 5) { return false; }" ? If the path
> just had a moveTo and a lineTo wouldn't we be accessing uninitialized memory?

Done, nice catch.

https://codereview.chromium.org/2017313002/diff/40001/tests/PathTest.cpp
File tests/PathTest.cpp (right):

https://codereview.chromium.org/2017313002/diff/40001/tests/PathTest.cpp#newc...
tests/PathTest.cpp:2037: check_simple_closed_rect(reporter, path2, testRect,
dir, start);
On 2016/05/31 21:48:36, robertphillips wrote:
> An -> A ?

Done.

Powered by Google App Engine
This is Rietveld 408576698