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

Issue 38573007: Do not apply hairline optimization for paths if nv_path_rendering is used (Closed)

Created:
7 years, 2 months ago by Kimmo Kinnunen
Modified:
7 years ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Apply hairline optimization only if the path renderer wants it Make the decision to convert thin, non-hairline paths to hairline paths at the renderer level. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by a renderer that wants the optimization. Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. Applies the optimization for GrAAHairLineRenderer and GrDefaultPathRenderer. This changes gm results for dashing3_{msaa4,gpu} and drawlooper_msaa4. Committed: http://code.google.com/p/skia/source/detail?r=12357

Patch Set 1 #

Total comments: 2

Patch Set 2 : address review comments #

Total comments: 4

Patch Set 3 : address comments #

Patch Set 4 : trying to fix xoom regression #

Patch Set 5 : address problems #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -111 lines) Patch
M src/core/SkDraw.cpp View 1 2 3 4 2 chunks +7 lines, -18 lines 0 comments Download
M src/core/SkDrawProcs.h View 1 2 3 1 chunk +21 lines, -1 line 0 comments Download
M src/gpu/GrAAHairLinePathRenderer.cpp View 1 2 3 3 chunks +18 lines, -4 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 11 chunks +25 lines, -44 lines 0 comments Download
M src/gpu/GrDefaultPathRenderer.cpp View 1 2 3 4 6 chunks +23 lines, -5 lines 0 comments Download
M src/gpu/GrDrawState.h View 1 2 1 chunk +3 lines, -7 lines 0 comments Download
M src/gpu/GrDrawState.cpp View 1 2 4 chunks +3 lines, -4 lines 0 comments Download
M src/gpu/GrDrawTarget.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M src/gpu/GrOvalRenderer.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 1 2 3 8 chunks +18 lines, -10 lines 0 comments Download
M src/gpu/GrPathRenderer.h View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 2 chunks +0 lines, -12 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/gl/GrGLProgramDesc.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
Kimmo Kinnunen
Not so neat place to call GrContext::getGpu() and related things. It's not obvious to me ...
7 years, 2 months ago (2013-10-24 12:28:46 UTC) #1
bsalomon
https://codereview.chromium.org/38573007/diff/1/src/gpu/SkGpuDevice.cpp File src/gpu/SkGpuDevice.cpp (right): https://codereview.chromium.org/38573007/diff/1/src/gpu/SkGpuDevice.cpp#newcode859 src/gpu/SkGpuDevice.cpp:859: bool treat_paint_as_hairline(const SkPaint& paint, const GrContext* context, SkScalar* hairlineCoverage) ...
7 years, 2 months ago (2013-10-24 13:28:35 UTC) #2
Kimmo Kinnunen
How about this? https://codereview.chromium.org/38573007/diff/1/src/gpu/SkGpuDevice.cpp File src/gpu/SkGpuDevice.cpp (right): https://codereview.chromium.org/38573007/diff/1/src/gpu/SkGpuDevice.cpp#newcode859 src/gpu/SkGpuDevice.cpp:859: bool treat_paint_as_hairline(const SkPaint& paint, const GrContext* ...
7 years, 1 month ago (2013-10-30 09:33:41 UTC) #3
bsalomon
https://codereview.chromium.org/38573007/diff/60001/src/core/SkDrawProcs.h File src/core/SkDrawProcs.h (right): https://codereview.chromium.org/38573007/diff/60001/src/core/SkDrawProcs.h#newcode72 src/core/SkDrawProcs.h:72: SkScalar* coverage) { param alignment https://codereview.chromium.org/38573007/diff/60001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): ...
7 years, 1 month ago (2013-10-30 14:37:38 UTC) #4
Kimmo Kinnunen
https://codereview.chromium.org/38573007/diff/60001/src/core/SkDrawProcs.h File src/core/SkDrawProcs.h (right): https://codereview.chromium.org/38573007/diff/60001/src/core/SkDrawProcs.h#newcode72 src/core/SkDrawProcs.h:72: SkScalar* coverage) { On 2013/10/30 14:37:39, bsalomon wrote: > ...
7 years, 1 month ago (2013-11-01 14:56:19 UTC) #5
Kimmo Kinnunen
Brian, ping. Was this anything you intended?
7 years, 1 month ago (2013-11-07 13:37:36 UTC) #6
bsalomon
On 2013/11/07 13:37:36, kkinnunen wrote: > Brian, ping. Was this anything you intended? Thanks for ...
7 years, 1 month ago (2013-11-07 16:11:56 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/38573007/130001
7 years, 1 month ago (2013-11-08 06:09:00 UTC) #8
commit-bot: I haz the power
Change committed as 12185
7 years, 1 month ago (2013-11-08 06:19:39 UTC) #9
Kimmo Kinnunen
Thanks for the review. The dashing gm pictures would need to be updated. Is there ...
7 years, 1 month ago (2013-11-08 06:25:02 UTC) #10
bsalomon
On 2013/11/08 06:25:02, kkinnunen wrote: > Thanks for the review. > The dashing gm pictures ...
7 years, 1 month ago (2013-11-08 14:49:51 UTC) #11
Kimmo Kinnunen
On 08.11.2013 16:15, Jim Van Verth wrote: > has caused a regression in the ovals ...
7 years, 1 month ago (2013-11-13 13:27:26 UTC) #12
bsalomon
On 2013/11/13 13:27:26, kkinnunen wrote: > On 08.11.2013 16:15, Jim Van Verth wrote: > > ...
7 years, 1 month ago (2013-11-13 18:23:06 UTC) #13
bsalomon
> > > > I uploaded a new version of the patch that tries to ...
7 years, 1 month ago (2013-11-13 18:23:46 UTC) #14
bsalomon
Hey Ravi, any idea why there is no "try more bots" link on this issue?
7 years, 1 month ago (2013-11-13 18:26:34 UTC) #15
jvanverth1
While rebaselining I noticed that some of the hairline roundrects in pathinterior and rrect also ...
7 years, 1 month ago (2013-11-13 18:44:53 UTC) #16
bsalomon
On 2013/11/13 18:44:53, JimVV wrote: > While rebaselining I noticed that some of the hairline ...
7 years, 1 month ago (2013-11-13 19:12:39 UTC) #17
Kimmo Kinnunen
On 2013/11/13 19:12:39, bsalomon wrote: > On 2013/11/13 18:44:53, JimVV wrote: > > While rebaselining ...
7 years, 1 month ago (2013-11-20 09:53:38 UTC) #18
jvanverth1
On 2013/11/20 09:53:38, kkinnunen wrote: > On 2013/11/13 19:12:39, bsalomon wrote: > > On 2013/11/13 ...
7 years, 1 month ago (2013-11-20 14:31:32 UTC) #19
bsalomon
On 2013/11/20 14:31:32, JimVV wrote: > On 2013/11/20 09:53:38, kkinnunen wrote: > > On 2013/11/13 ...
7 years, 1 month ago (2013-11-20 15:50:37 UTC) #20
Kimmo Kinnunen
On 2013/11/20 15:50:37, bsalomon wrote: > On 2013/11/20 14:31:32, JimVV wrote: > > On 2013/11/20 ...
7 years, 1 month ago (2013-11-21 07:14:04 UTC) #21
bsalomon
On 2013/11/21 07:14:04, kkinnunen wrote: > On 2013/11/20 15:50:37, bsalomon wrote: > > On 2013/11/20 ...
7 years, 1 month ago (2013-11-21 21:37:15 UTC) #22
bsalomon
On 2013/11/21 21:37:15, bsalomon wrote: > On 2013/11/21 07:14:04, kkinnunen wrote: > > On 2013/11/20 ...
7 years, 1 month ago (2013-11-21 21:37:24 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/38573007/530001
7 years, 1 month ago (2013-11-22 06:50:08 UTC) #24
commit-bot: I haz the power
Change committed as 12357
7 years, 1 month ago (2013-11-22 07:02:17 UTC) #25
robertphillips
I have rebaselined the majority of the dashing3 changes in r12359 (Rebaseline dashing3 GMs for ...
7 years, 1 month ago (2013-11-22 13:44:09 UTC) #26
Kimmo Kinnunen
7 years ago (2013-11-25 06:29:29 UTC) #27
Message was sent while issue was closed.
On 2013/11/22 13:44:09, robertphillips wrote:
> I have rebaselined the majority of the dashing3 changes in r12359 (Rebaseline
> dashing3 GMs for r12357 https://codereview.chromium.org/83543002/). 
> 
> Kimmo - are these changes expected? From the title of this patch I wouldn't
> expect any changes when nv path rendering isn't being used.

Sorry for being ambiguous. Yes, changes to dashing3 were expected for
non-nv_path_rendering codepaths. Based on my (non-expert) visual inspection, the
change was ok..

Powered by Google App Engine
This is Rietveld 408576698