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

Issue 6351055: Fixed lingering gpu-path AA clip mask generation bug (Closed)

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

Description

The bug this delivery fixes is that for some cases where the gpu clip mask generation path combines gpu-drawn and SW-drawn clip masks the final mask would be incorrect. The problematic behavior was in the SW path renderer which has 3 issues (when it comes to clip mask rendering) 1) It uses the context's matrix to draw. This can/did lead to double application of the transforms. (This can be worked around by setting the Context's matrix to I - but that is rather side-effecty). 2) It uses the current clip to bound the size of the drawn area. During clip mask generation we are in the process of creating the clip mask and when we move the mask to the UL corner of the texture this bounding process can clip off part of the result. 3) The SW path renderer doesn't use the draw state's matrix. The clip mask manager alters the draw state's matrix to offset the mask (to the UL corner). Because the other path renderers respect the matrix but the SW path renderer does not this lead to mis-registration of SW path rendered masks. The solution implemented here (rather than passing special purpose flags to the SW path renderer) is to bypass the SW path renderer and directly call the SWMaskHelper (like the full SW path does). This avoids monkeying with get_path_and_clip_bounds (which performs the intersection with the current clip bound) and messing with the translate passed to the old sw_draw_path_to_mask_texture method.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed code review issues #

Patch Set 3 : Removed incorrect upload #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -116 lines) Patch
M src/gpu/GrClipMaskManager.h View 2 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrClipMaskManager.cpp View 1 17 chunks +69 lines, -19 lines 0 comments Download
M src/gpu/GrSWMaskHelper.h View 1 2 chunks +41 lines, -12 lines 2 comments Download
M src/gpu/GrSWMaskHelper.cpp View 1 5 chunks +55 lines, -38 lines 0 comments Download
M src/gpu/GrSoftwarePathRenderer.cpp View 1 7 chunks +19 lines, -46 lines 2 comments Download

Messages

Total messages: 5
robertphillips
12 years, 1 month ago (2012-06-29 17:18:38 UTC) #1
bsalomon
I think the SWMH class needs some docs. I also don't get the bit about ...
12 years, 1 month ago (2012-06-29 17:55:27 UTC) #2
robertphillips
I believe this addresses all the review issues. Note that the SWPR now uses the ...
12 years, 1 month ago (2012-06-29 20:38:38 UTC) #3
bsalomon
LGTM modulo nits http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSWMaskHelper.h File src/gpu/GrSWMaskHelper.h (right): http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSWMaskHelper.h#newcode73 src/gpu/GrSWMaskHelper.h:73: static bool drawToTexture(GrContext* context, DrawToTexture http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSoftwarePathRenderer.cpp ...
12 years, 1 month ago (2012-06-29 21:25:20 UTC) #4
robertphillips
12 years, 1 month ago (2012-06-29 21:39:45 UTC) #5
committed as r4416

http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSWMaskHelper.h
File src/gpu/GrSWMaskHelper.h (right):

http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSWMaskHelper.h#newc...
src/gpu/GrSWMaskHelper.h:73: static bool drawToTexture(GrContext* context,
On 2012/06/29 21:25:20, bsalomon wrote:
> DrawToTexture

Done.

http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSoftwarePathRendere...
File src/gpu/GrSoftwarePathRenderer.cpp (right):

http://codereview.appspot.com/6351055/diff/9002/src/gpu/GrSoftwarePathRendere...
src/gpu/GrSoftwarePathRenderer.cpp:138: &ast, antiAlias, &vm)) {
On 2012/06/29 21:25:20, bsalomon wrote:
> indentation

Done.
Sign in to reply to this message.

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