Commit Graph

4089 Commits

Author SHA1 Message Date
reed@android.com
32a4249cbd make a deep copy in CreateCGImageRef if we're 565, but first upscale to 32bit.
this at least draws the right colors, since we're 565 and CG only supports 1555
(unless someone knows how to tell CG we're 565...)

Fix ws in picturerecord

Enable dither in sample gradients, so the 4444 case isn't so ugly



git-svn-id: http://skia.googlecode.com/svn/trunk@264 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 03:33:52 +00:00
reed@android.com
dafaf7ac4d speedup 16bit shaders in the blitRect case
faster 32->16 blend by using the expand_16 intermediate format



git-svn-id: http://skia.googlecode.com/svn/trunk@263 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-10 03:05:59 +00:00
reed@android.com
b4e22d62da check for underflow in restore() during picture record, and ignore it
git-svn-id: http://skia.googlecode.com/svn/trunk@262 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-09 15:20:25 +00:00
reed@android.com
1134426f6b respect preferred config when png is index-based
git-svn-id: http://skia.googlecode.com/svn/trunk@261 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 20:09:23 +00:00
reed@android.com
40443b2371 fix (aaaargh) white-space
git-svn-id: http://skia.googlecode.com/svn/trunk@260 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 15:11:19 +00:00
reed@android.com
31745581ca use scalarcomparetype in matrix tests, so we don't do anything tricky
(unnecessary) when floats are fast



git-svn-id: http://skia.googlecode.com/svn/trunk@259 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 14:46:11 +00:00
reed@android.com
187d559590 add dox for scalarcomparetype
use internal mutable version of drawPath when we've cons'd up a path on behalf
of a rect



git-svn-id: http://skia.googlecode.com/svn/trunk@258 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 14:03:56 +00:00
reed@android.com
24fc56f7b1 initial golden-master images for gm tool
git-svn-id: http://skia.googlecode.com/svn/trunk@257 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 03:00:42 +00:00
reed@android.com
b9b9a18ab4 use genericRGB space to ensure that we decode exactly the pixels we encode
add -r option to gm to read and compare against known images



git-svn-id: http://skia.googlecode.com/svn/trunk@256 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-08 02:54:47 +00:00
reed@android.com
9dc5465c1c check if the encoder factory returned null
git-svn-id: http://skia.googlecode.com/svn/trunk@255 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 21:18:10 +00:00
reed@android.com
6189877c50 add support for encoding Index8 bitmaps into png
git-svn-id: http://skia.googlecode.com/svn/trunk@254 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 19:38:01 +00:00
reed@android.com
3d06a8c38d add FIXME to comment
git-svn-id: http://skia.googlecode.com/svn/trunk@253 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 18:19:59 +00:00
reed@android.com
e18f9dff7a initialize fShapeCount in init()
git-svn-id: http://skia.googlecode.com/svn/trunk@252 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 13:25:15 +00:00
reed@android.com
084ad42b91 fix white-space
git-svn-id: http://skia.googlecode.com/svn/trunk@251 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-07 13:20:37 +00:00
deanm@chromium.org
da94699149 Optimize some alpha blending modes.
- Inline the component calculation helpers.
- Reorder the computation in plus_modeproc.

This doubles the performance of plus_modeproc.

Review URL: http://codereview.appspot.com/88084


git-svn-id: http://skia.googlecode.com/svn/trunk@250 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-03 12:54:24 +00:00
reed@android.com
8433b5db1a more checks for null shapes in pictures
git-svn-id: http://skia.googlecode.com/svn/trunk@249 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-03 02:52:27 +00:00
reed@android.com
1c12abe350 fix gradients with alpha to convert to premul *after* the intermediate color
has been computed, othewise we can't distinguish 0x00000000 from 0x00FF0000
Add fast case for index blit where we read 4 src pixels at a time



git-svn-id: http://skia.googlecode.com/svn/trunk@248 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-02 15:01:02 +00:00
reed@android.com
ab840b81a9 remove (ack) test code in lineargradient when pos array is null
git-svn-id: http://skia.googlecode.com/svn/trunk@247 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-01 17:00:03 +00:00
deanm@chromium.org
bff8e29eaf Fix a precedence error in an assert in the fontconfig host.
Review URL: http://codereview.appspot.com/90060


git-svn-id: http://skia.googlecode.com/svn/trunk@246 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-07-01 07:49:44 +00:00
reed@android.com
a545a5598e fix config check to include SkColorPriv.h so we don't get the warning w/o need
git-svn-id: http://skia.googlecode.com/svn/trunk@245 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-29 17:07:19 +00:00
reed@android.com
4516f4786f use sk_bzero instead of bzero, since it isn't always available.
git-svn-id: http://skia.googlecode.com/svn/trunk@244 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-29 16:25:36 +00:00
reed@android.com
4b7577b042 add unittest for matrix::flatten
define constant for max value flatten/unflatten can return (so clients can put
the buffer on the stack)



git-svn-id: http://skia.googlecode.com/svn/trunk@243 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-29 16:14:41 +00:00
reed@android.com
0ad336f8c6 add shape flatten so they work properly in pictures
add flatten/unflatten to matrix



git-svn-id: http://skia.googlecode.com/svn/trunk@242 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-29 16:02:20 +00:00
reed@android.com
0bfffc59a0 add golden master code for shapes
git-svn-id: http://skia.googlecode.com/svn/trunk@241 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-26 20:22:44 +00:00
reed@android.com
09b84a00f7 add shape recording to pictuures (sans serialization)
git-svn-id: http://skia.googlecode.com/svn/trunk@240 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-26 20:22:26 +00:00
reed@android.com
0baf193754 detect nearly translate-only matrices when drawing bitmaps (for speed)
rename setXfermode(Mode) to setXfermodeMode(Mode) for sanity
fix memory leak in setXfermode(Mode)



git-svn-id: http://skia.googlecode.com/svn/trunk@239 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-24 12:41:42 +00:00
reed@android.com
d66eef7101 fix memory leak in new setXfermode()
git-svn-id: http://skia.googlecode.com/svn/trunk@238 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-24 12:29:16 +00:00
reed@android.com
ee0eb012c5 add new make target "all", to build all known targets
git-svn-id: http://skia.googlecode.com/svn/trunk@237 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-23 17:13:30 +00:00
reed@android.com
048522dd2a remove remaining references to porterduff
git-svn-id: http://skia.googlecode.com/svn/trunk@236 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-23 12:19:41 +00:00
reed@android.com
845fdaca17 remove deprecated use of porterduff enum
git-svn-id: http://skia.googlecode.com/svn/trunk@235 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-23 03:01:32 +00:00
reed@android.com
c9c6422903 update to use new xfermodes
git-svn-id: http://skia.googlecode.com/svn/trunk@234 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-23 00:09:12 +00:00
reed@android.com
8ede49268d merge in change from chrome to detect when the byte order for 8888 requires
additional CGBitmapInfo flags (e.g. for bigendian)



git-svn-id: http://skia.googlecode.com/svn/trunk@233 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-22 20:04:33 +00:00
reed@android.com
a0f5d1546d move xfermode modes from porterduff into xfermode itself
git-svn-id: http://skia.googlecode.com/svn/trunk@232 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-22 17:38:10 +00:00
reed@android.com
1a2fec55d9 add gm for shader tilemodes
git-svn-id: http://skia.googlecode.com/svn/trunk@231 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-22 02:17:34 +00:00
reed@android.com
42309d415e add gm for gradients
git-svn-id: http://skia.googlecode.com/svn/trunk@230 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-22 02:06:35 +00:00
reed@android.com
25b0434908 gm -w 'directory' now works for recording the master images
git-svn-id: http://skia.googlecode.com/svn/trunk@229 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-21 01:40:31 +00:00
reed@android.com
8015dd83ae almost there on gm (need to fix image writes/reads/compares)
move SkAutoGraphics into SkGraphics.h
add [] operators to SkString



git-svn-id: http://skia.googlecode.com/svn/trunk@228 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-21 00:49:18 +00:00
reed@android.com
dd0ac281e9 more progress on golden-master test suite (not finished yet)
git-svn-id: http://skia.googlecode.com/svn/trunk@227 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-20 02:38:16 +00:00
reed@android.com
086f2896e0 add width()/height() getters
git-svn-id: http://skia.googlecode.com/svn/trunk@226 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-20 02:34:55 +00:00
reed@android.com
90e764e3d9 update to latest api (need a test for this port!)
git-svn-id: http://skia.googlecode.com/svn/trunk@225 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-19 20:35:36 +00:00
deanm@chromium.org
5c44d321d0 Make sure we have a non-null FreeType face before dereferencing it.
This prevents a NULL pointer crash in generateFontMetrics with some fonts.

Patch by Lei Zhang.  Original Chromium bug: http://code.google.com/p/chromium/issues/detail?id=13007

Review URL: http://codereview.appspot.com/78056


git-svn-id: http://skia.googlecode.com/svn/trunk@224 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-19 08:57:16 +00:00
reed@android.com
a16cb97c89 really fix gif movie registration
git-svn-id: http://skia.googlecode.com/svn/trunk@223 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-18 20:26:58 +00:00
reed@android.com
5df93eada5 fix stupid tabs
git-svn-id: http://skia.googlecode.com/svn/trunk@222 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-18 18:52:22 +00:00
reed@android.com
8540a79396 add registrar for gif movie
git-svn-id: http://skia.googlecode.com/svn/trunk@221 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-18 17:53:12 +00:00
deanm@chromium.org
81aaa9d8c0 Fix MSVC builds by avoiding a uint to bool warning.
warning C4800: 'const uint8_t' : forcing value to bool 'true' or 'false' (performance warning)

Review URL: http://codereview.appspot.com/79043


git-svn-id: http://skia.googlecode.com/svn/trunk@220 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-18 14:46:03 +00:00
reed@android.com
0ea42c1d2c fallback to drawing a line if the cubic is still too curvy, even if we've
exhausted our recursive attempts to subdivide.

Fixes trying to stroke this cubic (width==1.0)

    path.moveTo(460.2881309415525, 303.250847066498);
    path.cubicTo(463.36378422175284, 302.1169735073363,
                 456.32239330810046, 304.720354932878,
                 453.15255460013304, 305.788586869862);



git-svn-id: http://skia.googlecode.com/svn/trunk@219 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-17 19:21:01 +00:00
reed@android.com
ad687ceae2 add sample for mipmaps
git-svn-id: http://skia.googlecode.com/svn/trunk@218 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-16 01:50:25 +00:00
reed@android.com
31d1c64bd5 ws fixes
git-svn-id: http://skia.googlecode.com/svn/trunk@217 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-15 18:45:19 +00:00
reed@android.com
9a74d31345 create separate opaque version of rgb16 blitter
git-svn-id: http://skia.googlecode.com/svn/trunk@216 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-15 15:56:35 +00:00
reed@android.com
b3ade9d1b0 add optional Format* parameter to decoder helper functions.
git-svn-id: http://skia.googlecode.com/svn/trunk@215 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-15 13:04:45 +00:00