Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5570)

Issue 6453085: Adding storage of SkPath::fIsOval (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by robertphillips
Modified:
11 years, 11 months ago
Reviewers:
Leon, bsalomon, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The fIsOval flag is lost when drawing is deferred. This prevents the gpu path from converting the path to a circle draw. Without this change (bench w/ -mode deferred): running bench [640 480] arc 8888: cmsecs = 30.99 GPU: cmsecs = 119.39 gmsecs = 106.94 With this change: running bench [640 480] arc 8888: cmsecs = 33.70 GPU: cmsecs = 21.11 gmsecs = 12.65

Patch Set 1 #

Patch Set 2 : Added storage of fConvexity & moved into existing int32_t #

Total comments: 2

Patch Set 3 : Streamlined code #

Patch Set 4 : Added unit test #

Patch Set 5 : Undid indentation to make code review easier #

Patch Set 6 : cleaned up oval test code #

Total comments: 1

Patch Set 7 : Made read match write (both 8 bits) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -13 lines) Patch
M src/core/SkPath.cpp View 1 2 3 4 5 6 3 chunks +7 lines, -2 lines 0 comments Download
M tests/PathTest.cpp View 1 2 3 4 5 3 chunks +35 lines, -11 lines 0 comments Download

Messages

Total messages: 19
robertphillips
11 years, 11 months ago (2012-08-03 20:05:03 UTC) #1
reed1
If we can pack this into the existing int32 (segmasks, filltype), then we don't break ...
11 years, 11 months ago (2012-08-03 20:14:49 UTC) #2
robertphillips
Done. Also added storage of "fConvexity". Here are the numbers on the existing bench marks: ...
11 years, 11 months ago (2012-08-06 13:20:54 UTC) #3
reed1
http://codereview.appspot.com/6453085/diff/1002/src/core/SkPath.cpp File src/core/SkPath.cpp (right): http://codereview.appspot.com/6453085/diff/1002/src/core/SkPath.cpp#newcode1712 src/core/SkPath.cpp:1712: int32_t packed = (fConvexity << 16) | (fFillType << ...
11 years, 11 months ago (2012-08-06 13:34:25 UTC) #4
robertphillips
http://codereview.appspot.com/6453085/diff/1002/src/core/SkPath.cpp File src/core/SkPath.cpp (right): http://codereview.appspot.com/6453085/diff/1002/src/core/SkPath.cpp#newcode1712 src/core/SkPath.cpp:1712: int32_t packed = (fConvexity << 16) | (fFillType << ...
11 years, 11 months ago (2012-08-06 13:51:15 UTC) #5
bsalomon
LGTM
11 years, 11 months ago (2012-08-06 14:06:10 UTC) #6
reed1
can we write a unittest that verifies that flattening works?
11 years, 11 months ago (2012-08-06 14:07:05 UTC) #7
robertphillips
Added unit test
11 years, 11 months ago (2012-08-06 17:19:10 UTC) #8
reed1
http://codereview.appspot.com/6453085/diff/7002/src/core/SkPath.cpp File src/core/SkPath.cpp (right): http://codereview.appspot.com/6453085/diff/7002/src/core/SkPath.cpp#newcode1734 src/core/SkPath.cpp:1734: // DIRTY_AFTER_EDIT resets fIsOval and fConvexity Why are we ...
11 years, 11 months ago (2012-08-06 20:20:25 UTC) #9
reed1
does the new test fail before your CL?
11 years, 11 months ago (2012-08-06 20:21:09 UTC) #10
robertphillips
Yep. The bounds match but the oval & convexity information is lost. [23/70] Path... FAILED: ...
11 years, 11 months ago (2012-08-07 11:31:22 UTC) #11
robertphillips
>>Why are we calling SkToBool? fIsOval is SkBool8... a byte. Why not just >>fIsOval = ...
11 years, 11 months ago (2012-08-07 11:43:15 UTC) #12
robertphillips
Ah ... so going back to your "why not (fIsOval << 24)" question. I was ...
11 years, 11 months ago (2012-08-07 11:49:02 UTC) #13
bsalomon
On 2012/08/07 11:49:02, robertphillips wrote: > Ah ... so going back to your "why not ...
11 years, 11 months ago (2012-08-07 12:33:02 UTC) #14
reed1
packing tightly into an int is fine with me, either all the time (in SkPath) ...
11 years, 11 months ago (2012-08-07 13:00:27 UTC) #15
robertphillips
I have made the read match the write (both 8 bits). I will leave the ...
11 years, 11 months ago (2012-08-07 15:30:23 UTC) #16
bsalomon
On 2012/08/07 15:30:23, robertphillips wrote: > I have made the read match the write (both ...
11 years, 11 months ago (2012-08-07 15:33:13 UTC) #17
reed1
lgtm
11 years, 11 months ago (2012-08-07 15:44:06 UTC) #18
robertphillips
11 years, 11 months ago (2012-08-07 17:33:10 UTC) #19
committed as r4991
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b