LGTM. Do you have a sense of how much performance improvement we can expect from this? http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h File include/gpu/GrSamplerState.h (left): http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h#... include/gpu/GrSamplerState.h:95: Filter filter) Why remove the alternate constructor? http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h File include/gpu/GrSamplerState.h (right): http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h#... include/gpu/GrSamplerState.h:193: } Could we turn 4 implementations of reset() into one + 3 convenience functions()? Or maybe use constants (sDefaultWrapMode, sDefaultSampleMode, sDefaultFilter)? We now have defaults re-specified 2-4 different places. http://codereview.appspot.com/5476052/diff/2001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): http://codereview.appspot.com/5476052/diff/2001/src/gpu/GrContext.cpp#newcode367 src/gpu/GrContext.cpp:367: filter); Yay!
On 2011/12/12 15:54:03, TomH wrote: > LGTM. > Do you have a sense of how much performance improvement we can expect from this? No idea. I'll have to reprofile the spreadsheet test. I think this change alone will be a pretty modest improvement, though. > > http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h > File include/gpu/GrSamplerState.h (left): > > http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h#... > include/gpu/GrSamplerState.h:95: Filter filter) > Why remove the alternate constructor? It's not being used. People shouldn't really be constructing sampler states in the new world. > > http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h > File include/gpu/GrSamplerState.h (right): > > http://codereview.appspot.com/5476052/diff/2001/include/gpu/GrSamplerState.h#... > include/gpu/GrSamplerState.h:193: } > Could we turn 4 implementations of reset() into one + 3 convenience functions()? > Or maybe use constants (sDefaultWrapMode, sDefaultSampleMode, sDefaultFilter)? > We now have defaults re-specified 2-4 different places. That seems sensible. > > http://codereview.appspot.com/5476052/diff/2001/src/gpu/GrContext.cpp > File src/gpu/GrContext.cpp (right): > > http://codereview.appspot.com/5476052/diff/2001/src/gpu/GrContext.cpp#newcode367 > src/gpu/GrContext.cpp:367: filter); > Yay!
committed r2852.