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

Issue 6498088: try to make dashing faster, by allowing it to be expressed as an array of points

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by reed1
Modified:
13 years, 1 month ago
Reviewers:
bungeman, bsalomon, DerekS
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

try to make dashing faster, by allowing it to be expressed as an array of points that we just draw as squares or circles. To trigger that, this CL introduces a virtual API on patheffect (where dashing happens) that allows the effect to return its "effect" as an array of points.

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -2 lines) Patch
M include/core/SkPathEffect.h View 1 2 3 chunks +25 lines, -0 lines 0 comments Download
M include/effects/SkDashPathEffect.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 5 2 chunks +53 lines, -2 lines 0 comments Download
M src/core/SkPathEffect.cpp View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M src/effects/SkDashPathEffect.cpp View 1 2 3 1 chunk +111 lines, -0 lines 0 comments Download

Messages

Total messages: 6
reed1
Proposed chanage to SkCanvas: static SkPoint* ptsAllocator(void* context, int numberOfPoints) { return (SkPoint*)sk_malloc_throw(numberOfPoints * sizeof(SkPoint*)); ...
13 years, 1 month ago (2012-09-04 15:43:03 UTC) #1
reed1
13 years, 1 month ago (2012-09-04 15:43:31 UTC) #2
bsalomon
On 2012/09/04 15:43:31, reed1 wrote: I might want to allocate differently depending on the mode ...
13 years, 1 month ago (2012-09-04 17:32:38 UTC) #3
reed1
... now with Mode parameter.
13 years, 1 month ago (2012-09-04 17:35:16 UTC) #4
bsalomon
On 2012/09/04 17:35:16, reed1 wrote: > ... now with Mode parameter. LGTM
13 years, 1 month ago (2012-09-04 18:36:41 UTC) #5
reed1
13 years, 1 month ago (2012-09-04 20:36:39 UTC) #6
> rbench -repeat 30 -match dashline Before CL: running bench [640 480] dashline_2_circle 8888: cmsecs = 104.12 565: cmsecs = 104.31 GPU: cmsecs = 113.40 NULLGPU: cmsecs = 108.53 running bench [640 480] dashline_1_circle 8888: cmsecs = 15.02 565: cmsecs = 14.65 GPU: cmsecs = 104.14 NULLGPU: cmsecs = 99.89 running bench [640 480] dashline_0_circle 8888: cmsecs = 14.92 565: cmsecs = 14.54 GPU: cmsecs = 16.36 NULLGPU: cmsecs = 13.94 running bench [640 480] dashline_2_square 8888: cmsecs = 38.43 565: cmsecs = 38.42 GPU: cmsecs = 46.80 NULLGPU: cmsecs = 41.87 running bench [640 480] dashline_1_square 8888: cmsecs = 15.02 565: cmsecs = 14.52 GPU: cmsecs = 48.47 NULLGPU: cmsecs = 43.78 running bench [640 480] dashline_0_square 8888: cmsecs = 15.02 565: cmsecs = 14.61 GPU: cmsecs = 16.21 NULLGPU: cmsecs = 13.98 After CL: running bench [640 480] dashline_2_circle 8888: cmsecs = 106.42 565: cmsecs = 107.13 GPU: cmsecs = 116.68 NULLGPU: cmsecs = 111.69 running bench [640 480] dashline_1_circle 8888: cmsecs = 136.59 565: cmsecs = 132.32 GPU: cmsecs = 159.42 NULLGPU: cmsecs = 87.35 running bench [640 480] dashline_0_circle 8888: cmsecs = 15.69 565: cmsecs = 15.97 GPU: cmsecs = 16.84 NULLGPU: cmsecs = 14.23 running bench [640 480] dashline_2_square 8888: cmsecs = 40.22 565: cmsecs = 40.04 GPU: cmsecs = 48.62 NULLGPU: cmsecs = 43.52 running bench [640 480] dashline_1_square 8888: cmsecs = 5.70 565: cmsecs = 4.56 GPU: cmsecs = 140.12 NULLGPU: cmsecs = 66.46 running bench [640 480] dashline_0_square 8888: cmsecs = 15.76 565: cmsecs = 15.93 GPU: cmsecs = 16.64 NULLGPU: cmsecs = 13.88 Summary: 1. dash effect needs to fold width==0 and width==1 together (if it can see the matrix) 2. gpu (or its caller) needs to fold width==0 and width==1 together in drawPoints 3. gpu should probably never call back into SkDraw::drawPoints, for that is wicket slow (see dashline_1_square before and after) I want to address some of these before committing.
Sign in to reply to this message.

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