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

Issue 7026049: This CL introduces a new path renderer. (Closed)

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

Description

This CL introduces a new path renderer. Here are the characteristics : - It uses the original path, before stroking - It supports traight lines only (no curves) - It supports butt or square caps only - It supports miter or bevel joins only - No AA support Support for these will be added step by step later on. A first pass at the benchmarks on my linux machine gave me these approximate speed improvements (running all bench with the option '--forceAA 0') : path_stroke_small_long_line 4X path_stroke_small_sawtooth 4X path_stroke_big_rect 4X path_stroke_small_rect 6X path_stroke_big_triangle 4X path_stroke_small_triangle 10X lines_1_BW 1.5X dashline_2_square 1.5X dashline_1_square 1.5X Also note that I can't submit this code until GrDrawTarget::isOpaque() is implemented, unless I just disable my renderer completely for now. BUG=chromium:135111 TEST=The following gms are affected and may require rebaselining : lineclosepath, linepath, strokes_poly Committed: https://code.google.com/p/skia/source/detail?r=7047

Patch Set 1 #

Total comments: 26

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+382 lines, -15 lines) Patch
A experimental/StrokePathRenderer/GrStrokePathRenderer.h View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A experimental/StrokePathRenderer/GrStrokePathRenderer.cpp View 1 2 1 chunk +305 lines, -0 lines 0 comments Download
M gyp/common_variables.gypi View 1 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/gpu.gyp View 1 1 chunk +9 lines, -0 lines 0 comments Download
M include/gpu/GrConfig.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M src/gpu/GrAddPathRenderers_default.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 chunks +22 lines, -15 lines 0 comments Download

Messages

Total messages: 8
sugoi
11 years, 8 months ago (2013-01-03 17:08:51 UTC) #1
Stephen White
> Here are the characteristics : > - It uses the non stroked path Not ...
11 years, 8 months ago (2013-01-03 19:27:14 UTC) #2
Stephen White
https://codereview.appspot.com/7026049/diff/1/src/gpu/GrProceduralPathRenderer.cpp File src/gpu/GrProceduralPathRenderer.cpp (right): https://codereview.appspot.com/7026049/diff/1/src/gpu/GrProceduralPathRenderer.cpp#newcode35 src/gpu/GrProceduralPathRenderer.cpp:35: SkScalar d = (x1 - x2) * (y3 - ...
11 years, 8 months ago (2013-01-03 19:56:10 UTC) #3
bsalomon
I think we should check this into experimental and hide enabling it in the PR ...
11 years, 8 months ago (2013-01-03 20:23:09 UTC) #4
sugoi
I tried to make it easy to enable this code just by setting a flag ...
11 years, 8 months ago (2013-01-04 16:48:12 UTC) #5
bsalomon
Can you add #if !defined(GR_STROKE_PATH_RENDERING) #define GR_STROKE_PATH_RENDERING 0 #endif to GrConfig.h? (right above where the ...
11 years, 8 months ago (2013-01-04 18:52:27 UTC) #6
sugoi
https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp File experimental/StrokePathRenderer/GrStrokePathRenderer.cpp (right): https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp#newcode17 experimental/StrokePathRenderer/GrStrokePathRenderer.cpp:17: { On 2013/01/04 18:52:28, bsalomon wrote: > style-nit: { ...
11 years, 8 months ago (2013-01-04 20:40:37 UTC) #7
bsalomon
11 years, 8 months ago (2013-01-04 23:00:55 UTC) #8
On 2013/01/04 20:40:37, sugoi wrote:
>
https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRende...
> File experimental/StrokePathRenderer/GrStrokePathRenderer.cpp (right):
> 
>
https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRende...
> experimental/StrokePathRenderer/GrStrokePathRenderer.cpp:17: {
> On 2013/01/04 18:52:28, bsalomon wrote:
> > style-nit: { on previous line
> 
> Done.
> 
>
https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRende...
> File experimental/StrokePathRenderer/GrStrokePathRenderer.h (right):
> 
>
https://codereview.appspot.com/7026049/diff/4003/experimental/StrokePathRende...
> experimental/StrokePathRenderer/GrStrokePathRenderer.h:12: // This path
renderer
> is made to create geometry (i.e. primitives) from the original path (before
> On 2013/01/04 18:52:28, bsalomon wrote:
> > I was thinking above (outside the class) but not big deal.
> 
> Done.
> 
> https://codereview.appspot.com/7026049/diff/4003/src/gpu/GrContext.cpp
> File src/gpu/GrContext.cpp (right):
> 
>
https://codereview.appspot.com/7026049/diff/4003/src/gpu/GrContext.cpp#newcod...
> src/gpu/GrContext.cpp:1070: SkRect ovalRect;
> On 2013/01/04 18:52:28, bsalomon wrote:
> > Can this be simplified a bit? Why do we need to applyToPath here? 
> > 
> > It seems like we can just say
> > 
> > if (!isInverseFill && !isStrokeType & isoval) {
> >   drawOval
> > } 
> > 
> > If applyToPath actually does any work then the path will no longer be an
oval.
> 
> Done.

lgtm
Sign in to reply to this message.

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