The text context was saving and restore the draw state. However, it is used by ...
12 years, 7 months ago
(2012-03-16 21:15:31 UTC)
#1
The text context was saving and restore the draw state. However, it is used by
the caller of GrContext and GrContext requires most of the draw state to be
specified each draw via GrPaint anyway. The exceptions are:
1) the matrix (which the text context is already separately saving/restoring)
2) the clip (which the the text context doesn't modify)
3) stages that are accessible via GrDrawState but not GrPaint (paint provides
access to the first N of the drawState's M stages). The text context does in
fact use an extra stage for the glyph mask.
This change removes the save/restore and will explicitly disable the high
numbered stages in GrContext::setPaint (which we probably should be doing for
other code paths that aren't disabling the high stages when their finished). So,
I think this makes the code more robust and is a perf win.
http://codereview.appspot.com/5844049/diff/6001/src/gpu/GrDefaultTextContext.h
File src/gpu/GrDefaultTextContext.h (left):
http://codereview.appspot.com/5844049/diff/6001/src/gpu/GrDefaultTextContext....
src/gpu/GrDefaultTextContext.h:38: GrFontScaler* fScaler;
This field was unreferenced
Issue 5844049: text context doesn't need to save/restore the draw state
(Closed)
Created 12 years, 7 months ago by bsalomon
Modified 12 years, 7 months ago
Reviewers: TomH
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 1