GrContext will own a GrDrawState and fGpu and fDrawBuffer will both point at it. This ...
12 years, 8 months ago
(2012-03-27 16:24:44 UTC)
#1
GrContext will own a GrDrawState and fGpu and fDrawBuffer will both point at it.
This means that when we begin a draw into fDrawBuffer we don't have to copy the
draw state from GrGpu to fDrawBuffer.
>LGTM. What's ||win||? I don't know exactly... I only measured this as part of a ...
12 years, 8 months ago
(2012-03-27 17:35:25 UTC)
#3
>LGTM. What's ||win||?
I don't know exactly... I only measured this as part of a larger change a week
or so ago. The whole change was ~5% on the bench picture_playback_drawText.
http://codereview.appspot.com/5933043/diff/1/src/gpu/GrContext.cpp
File src/gpu/GrContext.cpp (right):
http://codereview.appspot.com/5933043/diff/1/src/gpu/GrContext.cpp#newcode1897
src/gpu/GrContext.cpp:1897: void GrContext::setPaint(const GrPaint& paint) {
On 2012/03/27 16:40:15, TomH wrote:
> Just to sanity check: this is a DrawState<-Paint interaction. Is there a
reason
> we've got all the logic for it on this third class, rather than built into
> DrawState?
That's a really good point. I'll either
a) follow this up with a change that moves this to a setter on GrDrawState
b) or skip straight to a change I've been planning to make GrPaint be a
public-facing limited interface to directly modify a GrDrawState (rather than
copying from GrPaint to GrDrawState) at each draw.
http://codereview.appspot.com/5933043/diff/1/src/gpu/GrContext.cpp#newcode2048
src/gpu/GrContext.cpp:2048: fDrawState = new GrDrawState();
On 2012/03/27 16:40:15, TomH wrote:
> I see we're releasing this with unref(); we don't need to manually ref() it?
No, the unref in ~GrContext is to balance the ref created by new GrDrawState().
Issue 5933043: Use a single GrDrawState in GrContext for direct and buffered drawing
(Closed)
Created 12 years, 8 months ago by bsalomon
Modified 12 years, 8 months ago
Reviewers: TomH
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 4