SkAutoRef seems lonely. Might as well delete it.
(On the other hand, SkAutoUnref is well-used.) NOTREECHECKS=true BUG=skia: R=bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/393953004
This commit is contained in:
parent
18515cf370
commit
a179a1ede9
@ -248,15 +248,6 @@ public:
|
||||
};
|
||||
#define SkAutoUnref(...) SK_REQUIRE_LOCAL_VAR(SkAutoUnref)
|
||||
|
||||
class SkAutoRef : SkNoncopyable {
|
||||
public:
|
||||
SkAutoRef(SkRefCnt* obj) : fObj(obj) { SkSafeRef(obj); }
|
||||
~SkAutoRef() { SkSafeUnref(fObj); }
|
||||
private:
|
||||
SkRefCnt* fObj;
|
||||
};
|
||||
#define SkAutoRef(...) SK_REQUIRE_LOCAL_VAR(SkAutoRef)
|
||||
|
||||
/** Wrapper class for SkRefCnt pointers. This manages ref/unref of a pointer to
|
||||
a SkRefCnt (or subclass) object.
|
||||
*/
|
||||
|
@ -293,7 +293,7 @@ bool GrTextStrike::addGlyphToAtlas(GrGlyph* glyph, GrFontScaler* scaler) {
|
||||
SkASSERT(fCache.contains(glyph));
|
||||
SkASSERT(NULL == glyph->fPlot);
|
||||
|
||||
SkAutoRef ar(scaler);
|
||||
SkAutoUnref ar(SkSafeRef(scaler));
|
||||
|
||||
int bytesPerPixel = GrMaskFormatBytesPerPixel(fMaskFormat);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user