Commit Graph

9 Commits

Author SHA1 Message Date
reed@google.com
2f3dc9dc4c add typefacecache
speedup lcd blits
clean up some samples



git-svn-id: http://skia.googlecode.com/svn/trunk@1220 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-02 17:33:45 +00:00
reed@google.com
261b8e2ca1 fix warnings
git-svn-id: http://skia.googlecode.com/svn/trunk@1129 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-14 17:53:24 +00:00
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
reed@android.com
44a6312cf6 call notifyPixelsChanged() when the pages are flipped in pageflippixelref
update samples



git-svn-id: http://skia.googlecode.com/svn/trunk@192 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-30 02:40:28 +00:00
reed@android.com
452f844f64 disable cubic test for now (currently broken)
git-svn-id: http://skia.googlecode.com/svn/trunk@124 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 18:47:55 +00:00
reed@android.com
3555591c15 add sanity checks to handles extremely large coordinates or filter margins.
Should not hurt features (we hope), but is an easy way to survive malicious
values on a small-memory machine like a handset.



git-svn-id: http://skia.googlecode.com/svn/trunk@123 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 18:46:55 +00:00
reed@android.com
791f5a11f2 Change (correct) SkImageRef's ownership rule for streams to the skia standard
pattern: the receiver will call ref() if it chooses when passed to a constructor
or setter, so the caller must balance its ownership itself. This matches how all
other refcnt objects are handled.



git-svn-id: http://skia.googlecode.com/svn/trunk@120 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 13:53:11 +00:00
reed@android.com
590ef3fd3a remember to specify the bloody font tag in the constructor!
git-svn-id: http://skia.googlecode.com/svn/trunk@118 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-10 04:02:30 +00:00
reed@android.com
330578d67d mac fonts sort of work now
- haven't tested rotation yet
- spacing/bounds still look bad



git-svn-id: http://skia.googlecode.com/svn/trunk@117 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-09 18:12:13 +00:00