Commit Graph

81 Commits

Author SHA1 Message Date
djsollen@google.com
cd9d69b9ce Upstreaming changes from android.
- fix compile warnings in the GPU code
- upstream android specific code (ifdef protected)
- fail gracefully when a custom allocator fails



git-svn-id: http://skia.googlecode.com/svn/trunk@936 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-14 20:30:14 +00:00
bsalomon@google.com
649a862186 Remove "true ||" in conditional that was accidentally checked in.
git-svn-id: http://skia.googlecode.com/svn/trunk@916 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:53:38 +00:00
bsalomon@google.com
1da0746fa1 Delete GL tex ID when last of GrGLTexture or GrGLRenderTarget that reference it is destroyed
git-svn-id: http://skia.googlecode.com/svn/trunk@915 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:51:57 +00:00
bsalomon@google.com
a7f84e150c Make flush discardable and lazily reset context
Review URL: http://codereview.appspot.com/4259059/



git-svn-id: http://skia.googlecode.com/svn/trunk@914 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-10 14:13:19 +00:00
bsalomon@google.com
0b50b2ed46 If we compute an exact clip bounds prefer it over user passed bounds. Also clarify that bounds are conservative.
Review URL: http://codereview.appspot.com/4254063/
 


git-svn-id: http://skia.googlecode.com/svn/trunk@909 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 21:07:21 +00:00
bsalomon@google.com
e8c701cbf5 Add filters to organize the VS project. Remove unused Gr files.
Review URL http://codereview.appspot.com/4243064/

git-svn-id: http://skia.googlecode.com/svn/trunk@904 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 18:19:05 +00:00
reed@google.com
480ab7d5f1 add LF at end of file (dumb warning)
git-svn-id: http://skia.googlecode.com/svn/trunk@902 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 15:36:57 +00:00
reed@google.com
27a1e77858 add LF at end of file (ancient warning appeased)
git-svn-id: http://skia.googlecode.com/svn/trunk@901 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-08 15:34:06 +00:00
bsalomon@google.com
ed856100c8 Fix warning about uninit var subpathClosed
git-svn-id: http://skia.googlecode.com/svn/trunk@897 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-07 14:07:01 +00:00
bsalomon@google.com
bf4338cb3b Fix Sample App on Win32 GL window resize, fix sk->gr convexity hint, fix grpath uninit warnings
Review URL http://codereview.appspot.com/4247055/


git-svn-id: http://skia.googlecode.com/svn/trunk@895 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 22:48:25 +00:00
reed@google.com
6f8f292aa7 add origin to device
used for interpreting the clipstack when a device is a layer



git-svn-id: http://skia.googlecode.com/svn/trunk@894 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 22:27:10 +00:00
bsalomon@google.com
5aaa69e433 Fixups for clipstack, convexity test for paths.
Review URL http://codereview.appspot.com/4250056/

git-svn-id: http://skia.googlecode.com/svn/trunk@891 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 20:29:08 +00:00
reed@google.com
eca7d34f1d fix () warning
git-svn-id: http://skia.googlecode.com/svn/trunk@889 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-04 19:33:13 +00:00
bsalomon@google.com
d302f1401b Add support for clipstack to Gr. GrClip is now a list of rects and paths with set operations to combine them. The stencil buffer is used to perform the set operations to put the clip into the stencil buffer. Building Gr's clip from Skia's clipStack is currently disabled due to the fact that Skia's clipStack is relative to the root layer not the current layer. This will be fixed in a subsequent CL.
git-svn-id: http://skia.googlecode.com/svn/trunk@878 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-03 13:54:13 +00:00
bsalomon@google.com
de6ac2dec5 Fix double delete of vb pool and missing delete of ib pool
git-svn-id: http://skia.googlecode.com/svn/trunk@860 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-25 21:50:42 +00:00
reed@google.com
a09368c971 fix bool bug so we can multisample now
git-svn-id: http://skia.googlecode.com/svn/trunk@851 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-24 21:42:29 +00:00
bsalomon@google.com
27847dedd9 Fix line endings in Gr files and set svn eol style to LF
git-svn-id: http://skia.googlecode.com/svn/trunk@832 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-22 20:59:41 +00:00
bsalomon@google.com
ffca400ef6 Make a separate path renderer object. Move enum types to GrTypes.h
Review URL http://codereview.appspot.com/4167067/



git-svn-id: http://skia.googlecode.com/svn/trunk@829 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-22 20:34:01 +00:00
bsalomon@google.com
ba9d628b1b suppress uninit warning in rb-tree
git-svn-id: http://skia.googlecode.com/svn/trunk@826 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-22 19:45:21 +00:00
bsalomon@google.com
6034c506bd Add red black tree
Review URL: http://codereview.appspot.com/4184063



git-svn-id: http://skia.googlecode.com/svn/trunk@823 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-22 16:37:47 +00:00
reed@google.com
aff86f3fe3 can't use this in STATIC_ASSERT on windows
git-svn-id: http://skia.googlecode.com/svn/trunk@820 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-18 21:07:35 +00:00
bsalomon@google.com
7a5af8b7dc Avoid putting adding vertex buffers to the pool when setting the complex clip.
Review URL: http://codereview.appspot.com/4180058/

git-svn-id: http://skia.googlecode.com/svn/trunk@817 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-18 18:40:42 +00:00
bsalomon@google.com
5d18c3872b Fix warning about non-local anonymous struct
git-svn-id: http://skia.googlecode.com/svn/trunk@815 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-18 16:21:58 +00:00
bsalomon@google.com
2c3b51f22b Moving GrGLIRect to include directory to fix build break using make files. (At some point we need to move many of the non-public headers to src)
git-svn-id: http://skia.googlecode.com/svn/trunk@814 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-18 16:20:14 +00:00
bsalomon@google.com
8895a7a0e2 Reduce glGets for stencil bits.
Clean up GL vs Gr rect conventions for viewport and scissor.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@813 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-18 16:09:55 +00:00
bsalomon@google.com
3723a484af Clean up geterror / log macros and globals for debugging. disable geterror in chrome by default.
Review URL: http://codereview.appspot.com/4170058/

git-svn-id: http://skia.googlecode.com/svn/trunk@810 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 21:47:25 +00:00
bsalomon@google.com
c6cf72381b Hide alloc size vs content size below API
Remove old gl shaders class
Move texture matrix to sampler class

git-svn-id: http://skia.googlecode.com/svn/trunk@808 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-17 16:43:10 +00:00
bsalomon@google.com
86afc2ae27 Batch consecutive draw rects.
Review URL: http://codereview.appspot.com/4178057/

git-svn-id: http://skia.googlecode.com/svn/trunk@800 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-16 16:12:19 +00:00
bsalomon@google.com
97b624529c Fix param order in setVertexSourceToBuffer calls due to r786 when GR_STATIC_RECT_VB is 1
Review URL: http://codereview.appspot.com/4179047/

git-svn-id: http://skia.googlecode.com/svn/trunk@788 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 18:27:55 +00:00
bsalomon@google.com
1c13c9668a Refactor how Gr handles vertex and index data. GrGpu and GrInOrderDrawBuffer both GrBufferAllocPool to manage reserved and set-to-array vertex and index data.
rietveld issue 4188049

git-svn-id: http://skia.googlecode.com/svn/trunk@786 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-14 16:51:21 +00:00
bsalomon@google.com
1b7c1b6fa8 Remove debugging printf that was accidentally left in 783.
git-svn-id: http://skia.googlecode.com/svn/trunk@784 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-11 14:45:11 +00:00
bsalomon@google.com
7acdb8e1d2 git-svn-id: http://skia.googlecode.com/svn/trunk@783 2bbb7eff-a529-9590-31e7-b0007b416f81 2011-02-11 14:07:02 +00:00
bsalomon@google.com
18908aacf3 When we create the GL context and FBO on mac for the GM test also setup the viewport and clear the stencil.
In GrGpuGL::readPixels make sure current rendertarget has been made current in GL before calling glReadPixels



git-svn-id: http://skia.googlecode.com/svn/trunk@761 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 14:51:55 +00:00
reed@google.com
b89a643b69 fix warning about size_t >= 0 (which must always be true)
git-svn-id: http://skia.googlecode.com/svn/trunk@760 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 13:20:30 +00:00
bsalomon@google.com
1962832771 Fix warnings on linux build (strict aliasing, cons init order, vars used only in asserts)
git-svn-id: http://skia.googlecode.com/svn/trunk@756 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-03 21:30:17 +00:00
bsalomon@google.com
d16983b31f Make aggressive shader opts an option in GrUserConfig.h. Currently just controls whether color=white optimization is applied (eliminates reading color varying and modulation by color). This was already a compile time option just not exposed through user config.
git-svn-id: http://skia.googlecode.com/svn/trunk@754 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-02 22:42:20 +00:00
bsalomon@google.com
4333323006 Make enabling static rect VB configurable by user config file.
git-svn-id: http://skia.googlecode.com/svn/trunk@753 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-02 19:24:54 +00:00
bsalomon@google.com
0748f217ba Attempt to simplify NPOT texture caps. Also fixes case where textures would unnecessarily be bloated to POT. Adds setting of sampler's filter setting in paint conversion.
git-svn-id: http://skia.googlecode.com/svn/trunk@751 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 22:56:16 +00:00
bsalomon@google.com
6f7fbc9fbb Adds ability to draw rects using a unit square vertex buffer. Useful when matrix/uniform changes are less expensive than sending new verts.
Adds optional matrix parameters to GrContext drawRect and drawRectToRect so that non-axis-aligned matrices can be drawn using these functions.

codereview Issue 4105049

git-svn-id: http://skia.googlecode.com/svn/trunk@749 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-01 19:12:40 +00:00
reed@google.com
5f6ee1a807 initialize int var-args to placate chrome's runtime check
git-svn-id: http://skia.googlecode.com/svn/trunk@746 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-31 14:24:48 +00:00
reed@google.com
02a7e6c117 fix slow performance on desktops by uping our max-texture-dim from 512 to
whatever the gpu itself broadcasts.



git-svn-id: http://skia.googlecode.com/svn/trunk@742 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 21:21:49 +00:00
reed@google.com
d2938db1d9 replace UINT32_MAX with portable macro
git-svn-id: http://skia.googlecode.com/svn/trunk@741 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-28 20:54:15 +00:00
reed@google.com
e42e8452aa work around framebuffer_blit confusion on linux -- better fix on the way
git-svn-id: http://skia.googlecode.com/svn/trunk@737 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 17:20:51 +00:00
reed@google.com
9341bb6f46 fix linux gpu build (don't need egl.h)
-This line, and those below, will be ignored--

M    trunk/gpu/include/GrGLConfig.h


git-svn-id: http://skia.googlecode.com/svn/trunk@736 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 17:11:51 +00:00
reed@google.com
8752ad7b2d close quotes on #error
git-svn-id: http://skia.googlecode.com/svn/trunk@734 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 04:55:57 +00:00
reed@google.com
386900790b fix warnings, including using GrTCast<> to go from &Obj -> uint32_t*
git-svn-id: http://skia.googlecode.com/svn/trunk@732 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-01-26 01:44:18 +00:00
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
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
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