Moved SW path renderer from GrContext.cpp to GrSoftwarePathRenderer.cpp (issue 6138056)

0 views
Skip to first unread message

robertp...@google.com

unread,
May 1, 2012, 10:08:51 AM5/1/12
to tomh...@google.com, skia-...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: TomH,

Description:
Mostly mechanical refactoring to move SW path rendering to new home.

Please review this at http://codereview.appspot.com/6138056/

Affected files:
M src/gpu/GrContext.cpp
M src/gpu/GrSoftwarePathRenderer.cpp


tomh...@google.com

unread,
May 1, 2012, 10:18:55 AM5/1/12
to robertp...@google.com, skia-...@googlegroups.com, re...@codereview-hr.appspotmail.com
LGTM modulo nits. Three cheers for shrinking GrContext.


http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp
File src/gpu/GrSoftwarePathRenderer.cpp (right):

http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp#newcode23
src/gpu/GrSoftwarePathRenderer.cpp:23: // TODO: the SW renderer can also
handle non-AA paths
Not clear to me what this TODO means. Could we amplify it a little?

http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp#newcode27
src/gpu/GrSoftwarePathRenderer.cpp:27: return true;
We removed the comment "TODO: set to true when filled out". What did
'filled out' mean that we're doing it now?

http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp#newcode202
src/gpu/GrSoftwarePathRenderer.cpp:202: bool
GrSoftwarePathRenderer::onDrawPath(const SkPath& path,
I see the calling context invoke drawPath(), rather than invoking this
directy - I assume that we're doing the typical Ganeshy thing, with
drawPath() in this' base class triggering onDrawPath() in subclasses?

http://codereview.appspot.com/6138056/

robertp...@google.com

unread,
May 1, 2012, 10:31:43 AM5/1/12
to tomh...@google.com, skia-...@googlegroups.com, re...@codereview-hr.appspotmail.com
committed as r3807


http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp
File src/gpu/GrSoftwarePathRenderer.cpp (right):

http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp#newcode23
src/gpu/GrSoftwarePathRenderer.cpp:23: // TODO: the SW renderer can also
handle non-AA paths
On 2012/05/01 14:18:55, TomH wrote:
> Not clear to me what this TODO means. Could we amplify it a little?

Done.
"filled out" meant filling out the functionality in onDrawPath (i.e.,
this refactoring). Basically we didn't want the GrSoftwarePathRenderer
to try to do anything until it actually had its implementation.

http://codereview.appspot.com/6138056/diff/1/src/gpu/GrSoftwarePathRenderer.cpp#newcode202
src/gpu/GrSoftwarePathRenderer.cpp:202: bool
GrSoftwarePathRenderer::onDrawPath(const SkPath& path,
Yes - the GrPathRenderer base class' drawPath double checks that the
draw is kosher then calls onDrawPath

http://codereview.appspot.com/6138056/
Reply all
Reply to author
Forward
0 new messages