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

Issue 5534063: add SkPath::cheapComputeDirection for stroke_and_fill

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

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -6 lines) Patch
M include/core/SkPath.h View 1 chunk +18 lines, -0 lines 1 comment Download
M src/core/SkPath.cpp View 1 chunk +131 lines, -0 lines 1 comment Download
M src/core/SkStroke.cpp View 1 chunk +5 lines, -6 lines 0 comments Download

Messages

Total messages: 2
reed1
12 years, 3 months ago (2012-01-10 16:55:54 UTC) #1
caryclark1
12 years, 3 months ago (2012-01-10 17:09:14 UTC) #2
lgtm

http://codereview.appspot.com/5534063/diff/1/include/core/SkPath.h
File include/core/SkPath.h (right):

http://codereview.appspot.com/5534063/diff/1/include/core/SkPath.h#newcode462
include/core/SkPath.h:462: bool cheapComputDirection(Direction* dir) const;
compute missing 'e'

http://codereview.appspot.com/5534063/diff/1/src/core/SkPath.cpp
File src/core/SkPath.cpp (right):

http://codereview.appspot.com/5534063/diff/1/src/core/SkPath.cpp#newcode1954
src/core/SkPath.cpp:1954: // cheap version of i = (i + 1) % n;
seems curious to optimize here but have the non-optimized expression a few lines
up. Maybe the thought is that you'll rarely get to the i >= n-2 case?

Would it make sense to compute

next = i + 1;
if (next == n) {
  next = 0;
} 
etc
before the cross_prod and
i = next afterwards?
Sign in to reply to this message.

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