Commit Graph

693 Commits

Author SHA1 Message Date
reed@google.com
c921843d85 fixes for some warnings:
- #if of something that was not defined
- explicit constructor call for baseclass in copy-constructor of subclass

http://code.google.com/p/skia/issues/detail?id=112



git-svn-id: http://skia.googlecode.com/svn/trunk@727 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 19:05:12 +00:00
bsalomon@google.com
759b0363da Add SampleShaderText to vs project.
git-svn-id: http://skia.googlecode.com/svn/trunk@726 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 18:43:06 +00:00
bsalomon@google.com
0fdaa22dea Add shaded text sample and gm test.
git-svn-id: http://skia.googlecode.com/svn/trunk@725 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 18:35:26 +00:00
reed@google.com
664a843e8b chrome always assumes BGRA for its textures
git-svn-id: http://skia.googlecode.com/svn/trunk@724 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 15:24:55 +00:00
reed@google.com
37a3133d20 fix comments for U8CPU and S16CPU
http://code.google.com/p/skia/issues/detail?id=113



git-svn-id: http://skia.googlecode.com/svn/trunk@723 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-25 14:55:42 +00:00
bsalomon@google.com
596189a049 Add GrGpuGLShaders2 to gr_files.mk
git-svn-id: http://skia.googlecode.com/svn/trunk@722 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-24 18:19:55 +00:00
bsalomon@google.com
7d34d2eecc Increase number of stages from 1 to 2
Move GrTextContext from stage 0 to stage 1 so it doesn't conflict with GrPaint (allow textured text)
Switch to dynamically generated shaders



git-svn-id: http://skia.googlecode.com/svn/trunk@721 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-24 17:41:47 +00:00
reed@google.com
1a2e8d233d make xfermode warning printf be debug-only
git-svn-id: http://skia.googlecode.com/svn/trunk@720 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 22:08:29 +00:00
reed@google.com
324f1bb181 fix release build
git-svn-id: http://skia.googlecode.com/svn/trunk@719 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 22:04:38 +00:00
bsalomon@google.com
5782d712ff Rev the GrContext interface. Context has draw* functions that take a new GrPaint object. Removed many of the lower-level GrGpu function call-throughs on context.
Remove unused/unsupported point size (we don't draw non-hairline points using GL points).
Change current* getter functions to get* for consistency.
Fix bounds when drawing inverse-filled paths.


git-svn-id: http://skia.googlecode.com/svn/trunk@718 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-21 21:03:59 +00:00
bsalomon@google.com
70915f0210 In GrMatrix's setScale, setSkew, & setTranslate check whether the values passed in make the matrix identity before setting the typemask.
git-svn-id: http://skia.googlecode.com/svn/trunk@717 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-20 14:13:13 +00:00
reed@google.com
3d8de049f5 replace GR_GL(GetIntegerv with GR_GL_GetIntegerv to ensure that we zero-init
the var-arg (needed for chrome)



git-svn-id: http://skia.googlecode.com/svn/trunk@716 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-20 02:18:00 +00:00
reed@google.com
bf858b7ef0 update chrome-specific glconfig (should make versions of this for mac/win/linux)
git-svn-id: http://skia.googlecode.com/svn/trunk@715 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 19:04:04 +00:00
reed@google.com
ba8efc8447 add experimental custom GL header for chrome
git-svn-id: http://skia.googlecode.com/svn/trunk@714 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 17:35:08 +00:00
bsalomon@google.com
42ab7ea76e Cleanup including of GL headers and provide way to include custom headers, extension getter.
git-svn-id: http://skia.googlecode.com/svn/trunk@713 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 17:19:40 +00:00
reed@google.com
e49d571175 fix fEntryCount when we purge a cache entry (bug caught by our validate())
git-svn-id: http://skia.googlecode.com/svn/trunk@712 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 14:30:26 +00:00
reed@google.com
117cc39f63 document new (temporary) build flags
git-svn-id: http://skia.googlecode.com/svn/trunk@711 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 13:19:27 +00:00
reed@google.com
f44aa376f0 add compile flag GR_SKIP_2POINTRADIAL_PROGRAMS to ignore the 2point-radial
shader programs (for now), which have problematic on some GPUs



git-svn-id: http://skia.googlecode.com/svn/trunk@710 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-19 13:15:36 +00:00
reed@google.com
01804b44f9 add getter/setter for TextureCache, so that clients can make their budget
decisions at runtime or per-context, rather than just at compile-time. Leaving
in the default values as is.



git-svn-id: http://skia.googlecode.com/svn/trunk@709 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:50:41 +00:00
reed@google.com
63100f9e36 add GR_BUILD_CHROME for now. hopefully we can replace it with other,
non-chrome-specific refactoring to accomodate those differences.



git-svn-id: http://skia.googlecode.com/svn/trunk@708 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:32:14 +00:00
reed@google.com
d4dfd10bb6 add new 2nd argument for rendertarget to SkGpuCanvas
git-svn-id: http://skia.googlecode.com/svn/trunk@707 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 21:05:42 +00:00
bsalomon@google.com
2e7b43d33c Remove notion of default rendertarget. This doesn't map well to usage patterns outside sample app. Make binding between SkGpuDevice and a GrRenderTarget more explicit. Create method on GrContext to wrap the current target in the 3D API with a GrRenderTarget.
git-svn-id: http://skia.googlecode.com/svn/trunk@706 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:57:22 +00:00
reed@google.com
44b2c73ca6 detect empty/inverted rect before using autobounds helper (as with prev. rev.)
git-svn-id: http://skia.googlecode.com/svn/trunk@705 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:55:57 +00:00
reed@google.com
abf15c189b don't use SkAutoPathBoundsUpdate until after we've checked for degenerate
dimensions, otherwise we might set the bounds, only to then abort and not
set any points.

Fixes assert if you call addRoundRect(r, 10, 10) when r is inverted
(i.e. r.fLeft > r.fRight)



git-svn-id: http://skia.googlecode.com/svn/trunk@704 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 20:35:51 +00:00
bsalomon@google.com
3f3ffd6ad9 Fix stencil format array.
git-svn-id: http://skia.googlecode.com/svn/trunk@703 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 17:14:52 +00:00
bsalomon@google.com
ed3a06804f Fix BGRA on ES Issue 109.
git-svn-id: http://skia.googlecode.com/svn/trunk@702 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 16:54:04 +00:00
bsalomon@google.com
1572b071a7 Fix vertex buffer size computation when deferred text is disabled. This change makes it consistent with recent changes to the vertex layout bitfield in Issue 106.
git-svn-id: http://skia.googlecode.com/svn/trunk@701 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-18 15:30:57 +00:00
reed@google.com
b9d84f3bed add black, opaque, blend variants for text blits, to exercise different
special cases in blitmask



git-svn-id: http://skia.googlecode.com/svn/trunk@700 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-17 19:45:43 +00:00
reed@google.com
9c7443db62 add SK_DISABLE_DITHER_32BIT_GRADIENT flag. If defined, disables the newly added
dithering for 32bit linear gradients.



git-svn-id: http://skia.googlecode.com/svn/trunk@699 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-17 18:46:37 +00:00
reed@google.com
21b0a2b4fe enable sse2 source in makefile
git-svn-id: http://skia.googlecode.com/svn/trunk@698 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-17 18:41:23 +00:00
reed@google.com
6bc2f5db71 add SSE2 opt files to xcode
git-svn-id: http://skia.googlecode.com/svn/trunk@697 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-17 18:37:43 +00:00
bsalomon@google.com
316f9923cb Use macro to call gl.
git-svn-id: http://skia.googlecode.com/svn/trunk@696 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 21:28:12 +00:00
reed@google.com
d728f6ecfa Remove static from template specilizations (linux build complained)
git-svn-id: http://skia.googlecode.com/svn/trunk@695 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 20:02:47 +00:00
bsalomon@google.com
8531c1cea2 Towards issue #106
Adds notion of texture multiple stages but currently just uses 1.


git-svn-id: http://skia.googlecode.com/svn/trunk@694 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 19:52:45 +00:00
reed@google.com
a76de3d1a9 If you #define SK_ALLOW_OVER_32K_BITMAPS, then skia will try to draw bitmaps
whose dimensions exceed 32K. In my testing, this is fine, but I'm coding this
as an opt-in feature for now, to allow for more testing before its enabled
by default.



git-svn-id: http://skia.googlecode.com/svn/trunk@693 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 18:30:42 +00:00
reed@google.com
d3b13bd5af initialize SkGlyph::fMaskFormat to avoid valgrind warnings
rebaseline gradients now that we dither our 32bit src



git-svn-id: http://skia.googlecode.com/svn/trunk@692 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 16:33:36 +00:00
reed@google.com
55b8e8c81a add dithering to 32bit linear gradients
git-svn-id: http://skia.googlecode.com/svn/trunk@691 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-13 16:22:35 +00:00
bsalomon@google.com
a827b41439 Should be calculating alignment based on the vertex size.
git-svn-id: http://skia.googlecode.com/svn/trunk@690 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-12 21:20:18 +00:00
reed@google.com
8195f67427 rename DrawState to DrState -- MS decided to #define DrawState, complicating
our (compiler) lives :(



git-svn-id: http://skia.googlecode.com/svn/trunk@689 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-12 18:14:28 +00:00
reed@google.com
ac20fb9955 add helpers to initialize our var-int args before calling GL. Some drivers
assert that those are zero on input, even though they are logically
output-only parameters.



git-svn-id: http://skia.googlecode.com/svn/trunk@688 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-12 17:14:53 +00:00
reed@google.com
0e4a885376 fix refcount bug - as picture gets referenced by canvas when canvas is a
picture-recording canvas, so it can't live on the stack. Probably a bug:
nested pictures should probably ref some internal impl, so that callers can be
free to use the stack when they want to.



git-svn-id: http://skia.googlecode.com/svn/trunk@687 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-12 17:14:04 +00:00
reed@google.com
9b2135a923 git-svn-id: http://skia.googlecode.com/svn/trunk@685 2bbb7eff-a529-9590-31e7-b0007b416f81 2011-01-11 19:45:38 +00:00
reed@google.com
7b201d2254 expose gpu-device-factory
use that factory in gpucanvas, rather than overriding createDevice

note: I think we now don't need the canvas parameter in device-factory



git-svn-id: http://skia.googlecode.com/svn/trunk@684 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-11 18:59:23 +00:00
reed@google.com
4b22602383 add getter/setter for device-factory on canvas
git-svn-id: http://skia.googlecode.com/svn/trunk@683 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-11 18:32:13 +00:00
reed@google.com
0e14e0ba07 add port for Brew - untested
git-svn-id: http://skia.googlecode.com/svn/trunk@682 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-11 15:53:52 +00:00
reed@google.com
272e7545a3 use -O2 for release, -g for debug (so we can get symbols for gdb)
git-svn-id: http://skia.googlecode.com/svn/trunk@681 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-10 14:54:30 +00:00
reed@google.com
9ce6e75248 init src either opaquely (e.g. white), or with a valid ctable index (e.g. 0)
git-svn-id: http://skia.googlecode.com/svn/trunk@680 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-10 14:04:07 +00:00
reed@google.com
232a660169 remove obsolete, unsupported sound files
git-svn-id: http://skia.googlecode.com/svn/trunk@679 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-07 15:34:36 +00:00
reed@google.com
e72766fe02 fix issue 99 -- unneeded assignment inside find_y
move find_y to right above its only caller (Spanerator)
reformat Spanerator methods to match coding style



git-svn-id: http://skia.googlecode.com/svn/trunk@678 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-07 15:00:44 +00:00
bsalomon@google.com
2fbc7fa460 Make SampleApp build on Win32 (still requires glew, this needs to be fixed)
In fbo test funciton set min filter to nearest (for systems that don't support rendering to level of a texture that isn't mip map complete.)
Add a lot more sample slides to the win32 build
Fix texture red/blue color swap on windows.

git-svn-id: http://skia.googlecode.com/svn/trunk@677 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-05 16:34:41 +00:00