reed@android.com
fcce647c0b
pull latest from android
...
git-svn-id: http://skia.googlecode.com/svn/trunk@132 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-20 12:23:07 +00:00
reed@android.com
4ddfe357da
check for NaN in path iterator (otherwise we have an infinite loop)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@131 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-20 12:16:09 +00:00
reed@android.com
797d51acd2
forgot to initialize fFactory in the unflatten constructor
...
git-svn-id: http://skia.googlecode.com/svn/trunk@130 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-20 12:08:57 +00:00
reed@android.com
04225dcdec
build with -Wall
...
fix associated warnings (at least on gcc 4.0.1)
git-svn-id: http://skia.googlecode.com/svn/trunk@129 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-20 04:59:37 +00:00
reed@android.com
49f0ff25a0
promote SkMask's rowBytes to 32bits, since its bounds is a 32bit rect
...
be sure a rect is sorted before using it as the path's bounds cache
git-svn-id: http://skia.googlecode.com/svn/trunk@128 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-19 21:52:42 +00:00
reed@android.com
79b2cd1be5
fix capitalization for system includes
...
git-svn-id: http://skia.googlecode.com/svn/trunk@127 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-18 19:10:34 +00:00
reed@android.com
eff416bec1
fix heapsort
...
git-svn-id: http://skia.googlecode.com/svn/trunk@126 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-18 03:08:15 +00:00
reed@android.com
a14ea0e930
Simplify font-chaining (fallbacks) to have fonthost just return the next
...
logical fontID.
Extend ImageRef to accept an imagedecoder factory, to replace calling the std
one.
git-svn-id: http://skia.googlecode.com/svn/trunk@125 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-17 17:59:53 +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
turk@google.com
dfb6fb5669
Add missing file.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@122 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 17:34:27 +00:00
reed@android.com
1337a7b14c
see prev. checkin (missed these files). Change ownership rule for streams to the
...
skia std. of receiver calls ref() if it needs to, but regardless, the caller
always manages/balances its own ownership.
git-svn-id: http://skia.googlecode.com/svn/trunk@121 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-16 13:56:10 +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
turk@google.com
6f8491bf76
Initial implementation of polygon trianagulation. It seems to be robust and passes the associated tests,
...
but has some problems:
(1) it generates T-vertices;
(2) it only works with right-handed outer contours;
(3) The sort and search are inefficient.
git-svn-id: http://skia.googlecode.com/svn/trunk@119 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-13 22:05:46 +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
reed@android.com
0bf64d48cc
implement fontmetrics
...
git-svn-id: http://skia.googlecode.com/svn/trunk@116 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-09 17:22:22 +00:00
reed@android.com
ea446b9bc5
check-point (2) on mac fonts
...
- simplify typeface factories
git-svn-id: http://skia.googlecode.com/svn/trunk@115 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-09 15:25:11 +00:00
reed@android.com
60dfdbc1ae
minor check-point for switching to glyphs
...
git-svn-id: http://skia.googlecode.com/svn/trunk@114 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-09 14:51:39 +00:00
reed@android.com
5e5adfd12c
migrate more legacy unittests into tests/
...
SkParse yet to be cleaned up
git-svn-id: http://skia.googlecode.com/svn/trunk@113 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-07 03:39:23 +00:00
reed@android.com
62533ed6bb
fix leak in Deserialize
...
git-svn-id: http://skia.googlecode.com/svn/trunk@112 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-06 15:57:26 +00:00
reed@android.com
fb12c3e6ba
fix ref() in CreateTypeface
...
fix comment in SkDraw.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@111 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-05 20:43:42 +00:00
reed@android.com
54043a394e
patch SkMath.h to build in ARMv4
...
test code for mac fonts (disabled)
git-svn-id: http://skia.googlecode.com/svn/trunk@110 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-05 14:14:49 +00:00
reed@android.com
b1d9d2ef28
Significant cleanup in api, and more importantly in sementics, of SkFontHost
...
- FindTypeface is now CreateTypeface, and what it returns is always considered
a new instance, even if it is from a cache (in which case it will have been
ref()'d. The caller must always balance its ownership by calling unref() on
the result when they are done.
- CloseStream is gone, since the caller can/must call stream->unref() when they
are done using it.
- ResolveTypeface is now ValidFontID, and just returns a bool.
git-svn-id: http://skia.googlecode.com/svn/trunk@109 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-04 17:37:51 +00:00
reed@android.com
069b827f8e
API cleanup: rename typeface Create to CreateFromName, and remove default arg
...
git-svn-id: http://skia.googlecode.com/svn/trunk@108 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-04 15:31:48 +00:00
reed@android.com
0650c6ca12
Move SkTSort.h back to private, and instead allow in the makefile for tests to
...
see private headers. This also means the tests don't have to use ../.. to find
the private header they want.
git-svn-id: http://skia.googlecode.com/svn/trunk@107 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-04 14:02:44 +00:00
turk@google.com
7d3a58a5e4
Format more consistently with the rest of Skia.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@106 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-04 01:33:35 +00:00
reed@android.com
ef772ddb86
remove unimplemented (and uncalled) SkTypeface::Hash()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@105 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-03 21:20:49 +00:00
reed@android.com
1116fb25e5
change srcover (and dstover) to use the faster thought slightly less accurate
...
computation of the scale factor (+1 instead of SkAlpha255To256). This has the
upside of guaranteeing that if the dst is opaque (alpha==255), it will always
stay opaque.
git-svn-id: http://skia.googlecode.com/svn/trunk@104 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-03 20:31:12 +00:00
reed@android.com
d66efc273e
add test for different srcover implementations
...
git-svn-id: http://skia.googlecode.com/svn/trunk@103 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-03 18:35:18 +00:00
turk@google.com
5755a2a9ab
Unit test and bug fixes for cubic Bezier clipping.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@102 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-03 02:56:05 +00:00
turk@google.com
4896f9e017
Add cubic clipping, similar to that of quad clipping. Both Newton-Raphson and Bisection are implemented, because it is not clear which one will yield the highest performance on a given platform. Bisection is turned on as the default.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@101 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-02 20:00:00 +00:00
reed@android.com
98de2bdbd1
explicitly call "our" version of clipPath in the case when clipRect needs to
...
turn itself into a path when the matrix rotates. This avoids infinite recursion
when the canvas is subclassed (e.g. SkPicture's recording canvas).
git-svn-id: http://skia.googlecode.com/svn/trunk@100 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-02 19:41:36 +00:00
reed@android.com
3abec1d7c3
add initial unittests for Path
...
add operator== for paths
still need to implement isRect!
git-svn-id: http://skia.googlecode.com/svn/trunk@99 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-02 05:36:20 +00:00
reed@android.com
a396a16d53
add tests (unittests) to Makefile
...
move SkTSort.h into public includes
git-svn-id: http://skia.googlecode.com/svn/trunk@98 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-28 18:26:14 +00:00
reed@android.com
d8730ea8b2
more tests (need more meat in there)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@97 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-27 22:06:06 +00:00
reed@android.com
ed673310e2
add initial unittest framework (tests)
...
move some previous unittests out of core classes and into tests
git-svn-id: http://skia.googlecode.com/svn/trunk@96 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-27 16:24:51 +00:00
reed@android.com
3469c76c40
Handle kA8 bitmaps drawing through a matrix (was infinitely recursive)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@95 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-24 19:03:20 +00:00
reed@android.com
ff7f389c8a
Oops, CreateTypeface takes over ownership of the stream, instead of just ref()
...
This should be changed, for until it is, fix CreateTypefaceFromFile to not call
unref() if the typeface got created.
git-svn-id: http://skia.googlecode.com/svn/trunk@94 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-20 21:11:40 +00:00
reed@android.com
1bfd0ca780
Implement CreateTypefaceFromFile
...
git-svn-id: http://skia.googlecode.com/svn/trunk@93 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-20 14:22:36 +00:00
reed@android.com
ae814c809e
add picture-record option to speedup complex clips
...
remove hack that stopped picture-playback from culling on clipPath() result
git-svn-id: http://skia.googlecode.com/svn/trunk@92 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-13 14:56:09 +00:00
reed@android.com
9b0390626f
remove white-space
...
git-svn-id: http://skia.googlecode.com/svn/trunk@91 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-11 15:09:58 +00:00
reed@android.com
62900b4c64
handle failure when creating a scalercontext
...
git-svn-id: http://skia.googlecode.com/svn/trunk@90 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-11 15:07:19 +00:00
reed@android.com
d9c0f0b57a
check for non-invertible matrices in getClipBounds()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@89 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-06 22:39:37 +00:00
reed@android.com
c07d23a6e2
Chop quads exactly on the clip bounds, so we don't spend CPU cycles walking them
...
when we're above or below the clip.
Still to do:
- chop in X to avoid 16.16. overflow in the edgelist
- apply the same logic for cubics (tho much harder math)
git-svn-id: http://skia.googlecode.com/svn/trunk@88 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-02-06 13:30:58 +00:00
reed@android.com
3a859a0034
draft of Text benchmark
...
not enabled yet, as having trouble with mac-fonthost port
git-svn-id: http://skia.googlecode.com/svn/trunk@87 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-28 00:56:29 +00:00
reed@android.com
a21ff6f6cf
add png to bench files
...
git-svn-id: http://skia.googlecode.com/svn/trunk@86 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-27 18:25:02 +00:00
reed@android.com
3c2b7e8b5e
explicitly define the gHead for the codec llist
...
git-svn-id: http://skia.googlecode.com/svn/trunk@85 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-27 01:43:36 +00:00
reed@android.com
45bcb22e7a
update header path (from android)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@84 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-26 23:54:06 +00:00
reed@android.com
f523e25da0
add BitmapBench
...
git-svn-id: http://skia.googlecode.com/svn/trunk@83 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-26 23:15:37 +00:00