Updates things so that in the present we can free the gamma caches and in the future we don't leak memory.
See also http://code.google.com/p/chromium/issues/detail?id=144930 http://code.google.com/p/skia/issues/detail?id=825
looks good, but I'm not sure we need to set the globals to anything afterwards, as, by definition, after Term no graphics calls should be made. https://codereview.appspot.com/6495071/diff/2001/src/core/SkPaint.cpp File src/core/SkPaint.cpp (right): https://codereview.appspot.com/6495071/diff/2001/src/core/SkPaint.cpp#newcode... src/core/SkPaint.cpp:1686: SkSafeUnref(gMaskGamma); Do we really need to set these globals to *anything* inside term? Can these lines be debug-only?
https://codereview.appspot.com/6495071/diff/2001/src/core/SkPaint.cpp File src/core/SkPaint.cpp (right): https://codereview.appspot.com/6495071/diff/2001/src/core/SkPaint.cpp#newcode... src/core/SkPaint.cpp:1686: SkSafeUnref(gMaskGamma); On 2012/09/04 13:36:59, reed1 wrote: > Do we really need to set these globals to *anything* inside term? Can these > lines be debug-only? The resets are now SkDEBUGCODE.
Committed revision 5382.