 Chromium Code Reviews
 Chromium Code Reviews Issue 18770007:
  Add a 'unique' method to SkRefCnt, document the usage, and add support.  (Closed) 
  Base URL: http://skia.googlecode.com/svn/trunk/
    
  
    Issue 18770007:
  Add a 'unique' method to SkRefCnt, document the usage, and add support.  (Closed) 
  Base URL: http://skia.googlecode.com/svn/trunk/| Index: src/core/SkTypefaceCache.cpp | 
| =================================================================== | 
| --- src/core/SkTypefaceCache.cpp (revision 10200) | 
| +++ src/core/SkTypefaceCache.cpp (working copy) | 
| @@ -69,9 +69,7 @@ | 
| while (i < count) { | 
| SkTypeface* face = fArray[i].fFace; | 
| bool strong = fArray[i].fStrong; | 
| - if ((strong && face->getRefCnt() == 1) || | 
| - (!strong && face->weak_expired())) | 
| - { | 
| + if ((strong && face->unique()) || (!strong && face->weak_expired())) { | 
| if (strong) { | 
| face->unref(); | 
| } else { |