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

Issue 7286047: Move vertex layout from GeometrySrcState to GrDrawState (Closed)

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

Description

Move vertex layout from GeometrySrcState to GrDrawState. The main chunk is pulling the vertex layout from GrDrawTarget::GeometrySrcState to GrDrawState. GeometrySrcState still stores the vertex size because it's needed for allocations. Because GeometrySrcState can be pushed and popped and we may need this behavior for the vertex layout, AutoGeometryPush now includes an AutoStateRestore and has been renamed to AutoGeometryAndStatePush. Finally vertexLayout has been removed as an argument to a number of routines. Before allocating geometry using AutoReleaseGeometry and reserveVertexAndIndexSpace(), it is now necessary to explicitly set any new vertexLayout in the current GrDrawState.

Patch Set 1 #

Total comments: 19

Patch Set 2 : Cleaned up spurious code. Added default vertex layout. #

Patch Set 3 : Replace fVertexFormat in DrawRecord with fVertexSize #

Total comments: 1

Patch Set 4 : Remove fVertexSize entirely from DrawRecord #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -123 lines) Patch
M src/gpu/GrAAConvexPathRenderer.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrAAHairLinePathRenderer.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download
M src/gpu/GrAARectRenderer.cpp View 1 4 chunks +6 lines, -5 lines 0 comments Download
M src/gpu/GrClipMaskManager.cpp View 1 2 chunks +2 lines, -5 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 5 chunks +11 lines, -7 lines 0 comments Download
M src/gpu/GrDefaultPathRenderer.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrDrawState.h View 1 5 chunks +19 lines, -1 line 0 comments Download
M src/gpu/GrDrawTarget.h View 1 11 chunks +27 lines, -31 lines 0 comments Download
M src/gpu/GrDrawTarget.cpp View 1 12 chunks +20 lines, -25 lines 0 comments Download
M src/gpu/GrGpu.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrGpu.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrInOrderDrawBuffer.h View 1 2 3 3 chunks +2 lines, -5 lines 0 comments Download
M src/gpu/GrInOrderDrawBuffer.cpp View 1 2 3 16 chunks +19 lines, -22 lines 3 comments Download
M src/gpu/GrTextContext.cpp View 1 2 chunks +7 lines, -8 lines 0 comments Download
M src/gpu/gl/GrGpuGL_program.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 11
JimVV
A couple of oddities: I'm not sure if line 206 (or so) in GrTextContext.cpp is ...
11 years, 9 months ago (2013-02-04 20:59:36 UTC) #1
bsalomon
https://codereview.appspot.com/7286047/diff/1/src/gpu/GrClipMaskManager.cpp File src/gpu/GrClipMaskManager.cpp (right): https://codereview.appspot.com/7286047/diff/1/src/gpu/GrClipMaskManager.cpp#newcode580 src/gpu/GrClipMaskManager.cpp:580: GrDrawTarget::AutoGeometryAndStatePush agasp(fGpu, GrDrawTarget::kReset_ASRInit); agasp - love it. Do we ...
11 years, 9 months ago (2013-02-04 22:37:12 UTC) #2
robertphillips
https://codereview.appspot.com/7286047/diff/1/src/gpu/GrAAHairLinePathRenderer.cpp File src/gpu/GrAAHairLinePathRenderer.cpp (right): https://codereview.appspot.com/7286047/diff/1/src/gpu/GrAAHairLinePathRenderer.cpp#newcode517 src/gpu/GrAAHairLinePathRenderer.cpp:517: target->drawState()->setVertexLayout(layout); fold the getVertexSize & assert lines together or ...
11 years, 9 months ago (2013-02-04 23:08:12 UTC) #3
JimVV
https://codereview.appspot.com/7286047/diff/1/src/gpu/GrAAHairLinePathRenderer.cpp File src/gpu/GrAAHairLinePathRenderer.cpp (right): https://codereview.appspot.com/7286047/diff/1/src/gpu/GrAAHairLinePathRenderer.cpp#newcode517 src/gpu/GrAAHairLinePathRenderer.cpp:517: target->drawState()->setVertexLayout(layout); On 2013/02/04 23:08:12, robertphillips wrote: > fold the ...
11 years, 9 months ago (2013-02-05 14:47:59 UTC) #4
robertphillips
lgtm
11 years, 9 months ago (2013-02-05 15:40:18 UTC) #5
bsalomon
https://codereview.appspot.com/7286047/diff/1/src/gpu/GrInOrderDrawBuffer.cpp File src/gpu/GrInOrderDrawBuffer.cpp (right): https://codereview.appspot.com/7286047/diff/1/src/gpu/GrInOrderDrawBuffer.cpp#newcode243 src/gpu/GrInOrderDrawBuffer.cpp:243: draw->fVertexLayout != drawState.getVertexLayout()) { On 2013/02/05 14:47:59, JimVV wrote: ...
11 years, 9 months ago (2013-02-05 15:43:18 UTC) #6
JimVV
On 2013/02/05 15:43:18, bsalomon wrote: > https://codereview.appspot.com/7286047/diff/1/src/gpu/GrInOrderDrawBuffer.cpp > File src/gpu/GrInOrderDrawBuffer.cpp (right): > > https://codereview.appspot.com/7286047/diff/1/src/gpu/GrInOrderDrawBuffer.cpp#newcode243 > ...
11 years, 9 months ago (2013-02-05 16:18:16 UTC) #7
JimVV
On 2013/02/05 16:18:16, JimVV wrote: > On 2013/02/05 15:43:18, bsalomon wrote: > > https://codereview.appspot.com/7286047/diff/1/src/gpu/GrInOrderDrawBuffer.cpp > ...
11 years, 9 months ago (2013-02-05 16:45:38 UTC) #8
bsalomon
https://codereview.appspot.com/7286047/diff/16003/src/gpu/GrInOrderDrawBuffer.cpp File src/gpu/GrInOrderDrawBuffer.cpp (right): https://codereview.appspot.com/7286047/diff/16003/src/gpu/GrInOrderDrawBuffer.cpp#newcode243 src/gpu/GrInOrderDrawBuffer.cpp:243: draw->fVertexSize != geomSrc.fVertexSize) { I don't think we need ...
11 years, 9 months ago (2013-02-05 16:50:10 UTC) #9
JimVV
On 2013/02/05 16:50:10, bsalomon wrote: > https://codereview.appspot.com/7286047/diff/16003/src/gpu/GrInOrderDrawBuffer.cpp > File src/gpu/GrInOrderDrawBuffer.cpp (right): > > https://codereview.appspot.com/7286047/diff/16003/src/gpu/GrInOrderDrawBuffer.cpp#newcode243 > ...
11 years, 9 months ago (2013-02-05 18:24:59 UTC) #10
bsalomon
11 years, 9 months ago (2013-02-05 18:26:24 UTC) #11
lgtm

https://codereview.appspot.com/7286047/diff/23003/src/gpu/GrInOrderDrawBuffer...
File src/gpu/GrInOrderDrawBuffer.cpp (right):

https://codereview.appspot.com/7286047/diff/23003/src/gpu/GrInOrderDrawBuffer...
src/gpu/GrInOrderDrawBuffer.cpp:261: drawState.getVertexSize();
nit: this->

https://codereview.appspot.com/7286047/diff/23003/src/gpu/GrInOrderDrawBuffer...
src/gpu/GrInOrderDrawBuffer.cpp:325: drawState.getVertexSize();
nit: this->

https://codereview.appspot.com/7286047/diff/23003/src/gpu/GrInOrderDrawBuffer...
src/gpu/GrInOrderDrawBuffer.cpp:561: size_t vertexSize =
getDrawState().getVertexSize();
nit: this->
Sign in to reply to this message.

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