GrDrawTarget::AutoStateRestore currently saves a copy of the GrDrawState in its cons or set and then ...
12 years, 8 months ago
(2012-03-27 17:58:03 UTC)
#1
GrDrawTarget::AutoStateRestore currently saves a copy of the GrDrawState in its
cons or set and then copies the GrDrawState back in the destructor. Moreover,
often the caller wants a completely reset GrDrawState after the save.
With this change the old GrDrawState is saved by a ptr copy / ref() call and
similar for restore. This always saves a GrDrawState copy on the restore. The
caller communicates to AutoStateRestore whether they want to start from a copy
of the current state or a reset state. If the caller says reset then no
GrDrawState copies are ever made.
Issue 5938043: Make fewer copies when using GrDrawTarget::AutoStateRestore
(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: 6