skia2/src/utils
reed@google.com 82065d667f remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with
SkSafeRef() and SkSafeUnref().

This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...

void SkRefCnt::safeRef() {
    if (this) {
        this->ref();
    }
}

Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.

static inline void SkSafeRef(SkRefCnt* obj) {
    if (obj) {
        obj->ref();
    }
}

This form is not ignored by an optimizing compile, so we use it instead.




git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 15:30:46 +00:00
..
mac When we create the GL context and FBO on mac for the GM test also setup the viewport and clear the stencil. 2011-02-07 14:51:55 +00:00
SDL update SDL port to support OpenGL 2009-05-29 03:40:05 +00:00
win Rev the GrContext interface. Context has draw* functions that take a new GrPaint object. Removed many of the lower-level GrGpu function call-throughs on context. 2011-01-21 21:03:59 +00:00
SkBoundaryPatch.cpp move boundarypatch into utils 2009-10-28 14:27:20 +00:00
SkCamera.cpp grab from latest android 2008-12-17 15:59:43 +00:00
SkColorMatrix.cpp fix rotation around 2nd axis 2009-11-10 17:58:47 +00:00
SkCubicInterval.cpp add SkEvalCubicInterval 2009-11-03 15:33:14 +00:00
SkCullPoints.cpp fix paraens to avoid warnings 2010-04-13 13:36:20 +00:00
SkDumpCanvas.cpp remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with 2011-02-07 15:30:46 +00:00
SkEGLContext_none.cpp fix build for linux 2010-12-23 20:20:51 +00:00
SkInterpolator.cpp add BitmapBench 2009-01-26 23:15:37 +00:00
SkLayer.cpp fixes for some warnings: 2011-01-25 19:05:12 +00:00
SkMeshUtils.cpp update on boundary patches 2009-10-28 14:25:34 +00:00
SkNinePatch.cpp add SkSfntUtils to parse some known truetype tables 2009-04-14 14:28:22 +00:00
SkNWayCanvas.cpp add -forceFilter to bench tool 2009-08-04 18:17:15 +00:00
SkOSFile.cpp Fix precedence error. 2010-07-28 17:10:28 +00:00
SkParse.cpp update windows port 2009-12-18 21:33:39 +00:00
SkParseColor.cpp add template macro to "safely" perform casts w/o breaking strict-aliasing 2011-01-05 15:50:27 +00:00
SkParsePath.cpp update windows port 2009-12-18 21:33:39 +00:00
SkProxyCanvas.cpp remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with 2011-02-07 15:30:46 +00:00
SkSfntUtils.cpp fix base linux build, adding freetype support 2009-09-28 16:12:48 +00:00
SkUnitMappers.cpp grab from latest android 2008-12-17 15:59:43 +00:00
utils_files.mk add layers 2010-02-12 17:17:10 +00:00