Commit Graph

57 Commits

Author SHA1 Message Date
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
5119bdb952 add shader flag kConstInY_Flag
this signals blitters that the shader will return the same results for a given
x value, independent of y. Useful inside blitRect(), where it can cache the
first call to shadeSpan() and reuse it on all subsequent scans. Works with
(non-rotated) linear-gradients, and Nx1 bitmaps.



git-svn-id: http://skia.googlecode.com/svn/trunk@214 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-12 21:27:03 +00:00
reed@android.com
b34086a37f add experimental state tracker for opengl
git-svn-id: http://skia.googlecode.com/svn/trunk@211 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-12 19:49:30 +00:00
reed@android.com
199f108f14 only call SkDevice::gainFocus() if we're actually drawing to a different device.
Saves overhead when using GL.



git-svn-id: http://skia.googlecode.com/svn/trunk@207 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-10 02:12:47 +00:00
reed@android.com
829c83c7c9 fix odd-pixel bug in mipmap downsamplers (thanks brett)
git-svn-id: http://skia.googlecode.com/svn/trunk@204 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-08 12:05:31 +00:00
reed@android.com
bbff1d507a add SkParsePath to go to/from SVG strings (e.g. "M0,0 L10,20")
git-svn-id: http://skia.googlecode.com/svn/trunk@203 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-05 16:21:03 +00:00
reed@android.com
ec3d6e5a2f update for cache updates
git-svn-id: http://skia.googlecode.com/svn/trunk@202 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-05 14:43:55 +00:00
reed@android.com
9b46e77ec2 fix dumpcanvas to recurse on pictures and shapes
add cached bitmap for gradients to avoid thrashing textures in gl



git-svn-id: http://skia.googlecode.com/svn/trunk@201 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-05 12:24:41 +00:00
reed@android.com
6b82d1adc6 add isConvex() hit to SkPath, to be used to speed up fills and opengl
set linewidth in gldevice for hair rects
remove some cruft from samples
add more gl-unimpl messages



git-svn-id: http://skia.googlecode.com/svn/trunk@199 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-03 02:35:01 +00:00
reed@android.com
daa200eba2 add unimpl macro to help track bugs
git-svn-id: http://skia.googlecode.com/svn/trunk@195 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-01 21:18:36 +00:00
reed@android.com
24cfaa7751 update includes for android for gl backend
git-svn-id: http://skia.googlecode.com/svn/trunk@194 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-01 19:48:56 +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
25fc5b9f0a update SDL port to support OpenGL
need to separate out SK_BUILD_FOR_MAC when we need to know where certain OS
headers are, and SK_BUILD_FOR_SDL when we are choosing an SkOSWindow variant...



git-svn-id: http://skia.googlecode.com/svn/trunk@190 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-29 03:40:05 +00:00
reed@android.com
aa5a7db64a move shapes subclasses into effects
git-svn-id: http://skia.googlecode.com/svn/trunk@188 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-27 01:20:10 +00:00
reed@android.com
c3a8c5fb38 create offscreen surface so we can set its RGB ordering to match our internals
git-svn-id: http://skia.googlecode.com/svn/trunk@187 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-26 13:27:48 +00:00
reed@android.com
437f35e5ec make include search paths relative
git-svn-id: http://skia.googlecode.com/svn/trunk@186 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 21:07:11 +00:00
reed@android.com
366ebeb248 update relative paths for sample code
git-svn-id: http://skia.googlecode.com/svn/trunk@185 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 21:01:38 +00:00
reed@android.com
2312091582 add actual sdl project file
git-svn-id: http://skia.googlecode.com/svn/trunk@184 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 20:57:52 +00:00
reed@android.com
b9af1aec8c add sampleapp_sdl
git-svn-id: http://skia.googlecode.com/svn/trunk@183 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 20:53:55 +00:00
reed@android.com
671cd65678 add SDL support
git-svn-id: http://skia.googlecode.com/svn/trunk@182 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 20:44:12 +00:00
reed@android.com
149e2f6159 add SkSafeRef / SkSafeUnref as inline static functions, to use in place of our
existing obj->safeRef(), which is unsafe since it can its 'if (this)' can be
optimized away by some compilers.

fix some overflows in mimpmap generation



git-svn-id: http://skia.googlecode.com/svn/trunk@181 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 14:39:03 +00:00
reed@android.com
ba974ccbdd add sample effects
git-svn-id: http://skia.googlecode.com/svn/trunk@180 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 13:48:35 +00:00
reed@android.com
f76bacff7f add SkSize for dimensions
add SkShape baseclass, in the hopes of having SkPicture inherit from that, and 
also using shapes as the extension mechanism for things like animated-gif



git-svn-id: http://skia.googlecode.com/svn/trunk@174 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-13 14:00:33 +00:00
reed@android.com
311c82db31 fix copyTo to only copy the minimum pixels per row, and to lock the src before
trying to access its colorTable. Update unittest for copyTo. Add sample for
using a mask to clip a layer.



git-svn-id: http://skia.googlecode.com/svn/trunk@168 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-05 23:13:23 +00:00
reed@android.com
add8808a42 update for config/ directory
git-svn-id: http://skia.googlecode.com/svn/trunk@153 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-04-12 01:49:38 +00:00
reed@android.com
d6638e644e add Table apis to SkFontHost
need to implement in _win backend



git-svn-id: http://skia.googlecode.com/svn/trunk@149 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-04-08 05:03:52 +00:00
reed@android.com
9c970453fd import portability fixes from Chrome around floats
move porting functions for SkDebugf into /ports directory



git-svn-id: http://skia.googlecode.com/svn/trunk@147 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-04-03 14:26:10 +00:00
reed@android.com
a3c0588694 add sample for gradients
git-svn-id: http://skia.googlecode.com/svn/trunk@144 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-04-02 20:49:39 +00:00
reed@android.com
d252db03d9 API change: SkPath computeBounds -> getBounds
git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-04-01 18:31:44 +00:00
reed@android.com
aefd2bc757 Add SkChunkAlloc::unalloc() to undo the last allocation, useful if the caller wants to treat the allocats like temp memory (see PictureRecord)
Call unalloc if a paint (or other cached object) is already in our list for picture recording
Use correct CompareType macro in SkCanvas::quickReject



git-svn-id: http://skia.googlecode.com/svn/trunk@138 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-30 21:02:14 +00:00
reed@android.com
3eab80cc1f rename drawable to drawing for now, so we don't collide with animator
remove sk_throw in pixelref. a debug statement is enough.



git-svn-id: http://skia.googlecode.com/svn/trunk@136 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-24 18:47:35 +00:00
reed@android.com
8898363b2e add check/hack to avoid drawing outside of the clip for hairlines
git-svn-id: http://skia.googlecode.com/svn/trunk@134 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-23 16:05:19 +00:00
reed@android.com
ae64551e2e check-point for drawables (experimental)
git-svn-id: http://skia.googlecode.com/svn/trunk@133 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-23 03:27:38 +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
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
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
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
fc25abdabf fix warnings
git-svn-id: http://skia.googlecode.com/svn/trunk@68 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-15 14:38:33 +00:00
reed@android.com
5c80ea17d4 first pass at clean up of the 3 config files
- note that SkUserConfig.h no longer actually does anything



git-svn-id: http://skia.googlecode.com/svn/trunk@60 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-08 17:49:50 +00:00
reed@android.com
b08eb2b3bc separate image encode and decode
remove obsolete build-flag for encode



git-svn-id: http://skia.googlecode.com/svn/trunk@56 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-06 20:16:26 +00:00
reed@android.com
bd700c391d add benchmark framework
git-svn-id: http://skia.googlecode.com/svn/trunk@52 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-05 03:34:50 +00:00
reed@android.com
da342a8917 update more sample code to new compose shader header
git-svn-id: http://skia.googlecode.com/svn/trunk@48 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-23 18:37:08 +00:00
reed@android.com
0767e4742e add CG imagedecoder (still needs encoding)
update some sample files to not use obsolete SkShaderExtras.h



git-svn-id: http://skia.googlecode.com/svn/trunk@46 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-23 16:06:51 +00:00
reed@android.com
76aa34bf8e add text to hostapp sample
rename duplicate of SkSVGPath.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@45 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-23 01:27:39 +00:00
reed@android.com
03ca3d19c4 move CreateTypefaceFromFile into fonthost porting layer, so we don't force a given port to have mmap access.
update core.proj as some headers have changed location



git-svn-id: http://skia.googlecode.com/svn/trunk@43 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-22 15:35:46 +00:00
reed@android.com
2b26cac4fd downgrade project files to 10.4 so more clients can use them
downgrade some CG calls in test apps to not require 10.5 apis
remove leftover printf in SkOSWindow_Mac.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@42 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-22 02:33:11 +00:00
reed@android.com
0680d6c7ca use native mac fonthost
add 444 and (fake) 565 support in cg



git-svn-id: http://skia.googlecode.com/svn/trunk@41 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-19 19:46:15 +00:00
reed@android.com
aaeab429f9 forgot these
git-svn-id: http://skia.googlecode.com/svn/trunk@40 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-19 19:18:38 +00:00
reed@android.com
3d85e7a44a forgot this file
git-svn-id: http://skia.googlecode.com/svn/trunk@39 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-19 19:17:29 +00:00
reed@android.com
64ad9663d6 add sampeapp proj
git-svn-id: http://skia.googlecode.com/svn/trunk@38 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-19 19:15:15 +00:00