junov@google.com
f93e717c7f
Refactoring the GrGpuGLShaders2 into 2 classes: GrGpuGLShaders
...
and GrGLProgram. The change also contains stubs and placeholders for GrEffect
(work in progress), which will extend shader and rendering capabilities in
Ganesh. The hash keys for the program cache table have been modified to be able
to accomodate variable-length keys, which will be required for GrEffect support.
Code review: http://codereview.appspot.com/4309045/
git-svn-id: http://skia.googlecode.com/svn/trunk@1031 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-31 21:26:24 +00:00
bsalomon@google.com
8fe72477f2
Add GrResource base class for ibs, texs, vbs, etc.
...
Add lostContext() to GrContext.
Review URL: http://codereview.appspot.com/4328044/
git-svn-id: http://skia.googlecode.com/svn/trunk@1026 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-30 21:26:44 +00:00
senorblanco@chromium.org
9d18b7873c
This CL implements a tesselated path renderer, using GLU's libtess. All of the
...
fill modes except hairline are supported. Note that the path renderer is not
enabled by default; to enable it, replace "GrCreatePathRenderer_none.cpp" with
"GrCreatePathRenderer_tesselated.cpp" in skia.gyp, and run gyp_skia, and build.
This change also contains a number of build fixes for Win32 (for building
SampleApp on VS2008) and Mac (for my ancient Mac Pro which supports
GL_EXT_framebuffer_object but not GL_ARB_framebuffer_object). Also,
priorityq-heap.c was removed from the SampleApp build, since it's #included by
priorityq.c (weird, I know).
NB: When this change is rolled into chrome, some modifications to chromium's
skia.gyp will be necessary.
Review URL: http://codereview.appspot.com/4289072/
git-svn-id: http://skia.googlecode.com/svn/trunk@1012 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-28 20:47:09 +00:00
bsalomon@google.com
dfe75bcf98
Add way to determine at link time what path renderer will be used.
...
Added mechanism for a custom path renderer to punt and fallback to default path renderer
git-svn-id: http://skia.googlecode.com/svn/trunk@1005 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-25 12:31:16 +00:00
bsalomon@google.com
f6a7c1106e
Rename flag that disables stencil buffer creation
...
Review URL: http://codereview.appspot.com/4273103/
git-svn-id: http://skia.googlecode.com/svn/trunk@1000 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-24 16:14:10 +00:00
bsalomon@google.com
a9ecdadfbc
Add GL_CHROMIUM_framebuffer_multisample support.
...
Review URL: http://codereview.appspot.com/4287072/
git-svn-id: http://skia.googlecode.com/svn/trunk@984 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-23 13:50:34 +00:00
reed@google.com
a03ec86e99
add GR at the end
...
git-svn-id: http://skia.googlecode.com/svn/trunk@981 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 17:49:13 +00:00
bsalomon@google.com
8361a0fa2c
Fix macro in Chrome's GL config file
...
Review URL: http://codereview.appspot.com/4308041/
git-svn-id: http://skia.googlecode.com/svn/trunk@980 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 14:38:11 +00:00
bsalomon@google.com
86c92b3d8f
Remove redundant defines of GR_GL macros.
...
Patch submitted by weiwei.li@intel.com
Review URL: http://codereview.appspot.com/4290060/
git-svn-id: http://skia.googlecode.com/svn/trunk@977 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-22 13:08:48 +00:00
bsalomon@google.com
d1e4335318
Remove IMG multisample texture support.
...
This never worked correctly. The texture loses multisample status when the resolve occurs. We never had code to re-establish it. Also, we'd have to handle the case where you resolve but then want to render to it again without clearing.
Review URL: http://codereview.appspot.com/4274074/
git-svn-id: http://skia.googlecode.com/svn/trunk@974 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 21:38:40 +00:00
bsalomon@google.com
c312bf9935
Remove old GR_* macros for GL extensions in favor of GrGLDefines.h
...
Review URL: http://codereview.appspot.com/4275061/
git-svn-id: http://skia.googlecode.com/svn/trunk@972 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 21:10:33 +00:00
bsalomon@google.com
918261018f
Add GR_DLL builds to Ganesh (minimal exports for Chrome multi-dll for now).
...
Review URL: http://codereview.appspot.com/4301044/
git-svn-id: http://skia.googlecode.com/svn/trunk@970 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-21 19:51:57 +00:00
twiz@google.com
b65e0cb8ad
Remove the compile-time selection of the GL implementation based on the
...
GR_SUPPORT_GLDESKTOP family of macros.
Support for the platform is configured dynamically, by querying the
fBindingsExported member of active GrGLInterface instance.
Review: http://codereview.appspot.com/4298048/
git-svn-id: http://skia.googlecode.com/svn/trunk@960 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 20:41:44 +00:00
twiz@google.com
0f31ca79bd
This CL removes all dependencies on GL headers across all of Ganesh. New
...
GrGLint, etc. types are introduced, and new GR_GL_XXXX constants for use at all
GL call-sites.
Review: http://codereview.appspot.com/4272061/
git-svn-id: http://skia.googlecode.com/svn/trunk@959 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 17:38:11 +00:00
bsalomon@google.com
098611bd74
Revert GR_STATIC_RECT_VB in GrGLConfig_chrome.h
...
Review URL: http://codereview.appspot.com/4282057/
git-svn-id: http://skia.googlecode.com/svn/trunk@958 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-18 15:10:06 +00:00
bsalomon@google.com
0078079b20
Make chrome use the static square vb when drawing rects.
...
Review URL: http://codereview.appspot.com/4280053/
git-svn-id: http://skia.googlecode.com/svn/trunk@949 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-16 20:10:48 +00:00
reed@google.com
759c16e20d
need a separate texture for each maskformat in atlasmgr
...
git-svn-id: http://skia.googlecode.com/svn/trunk@942 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-15 19:15:15 +00:00
bsalomon@google.com
080773ca79
Add blend constant color and use it for lcd text common case (no fancy blend or shaded text)
...
Review URL: http://codereview.appspot.com/4274057/
git-svn-id: http://skia.googlecode.com/svn/trunk@941 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-15 19:09:25 +00:00
reed@google.com
98539c607b
support lcd16 in text atlas (sans shader support)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@939 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-15 15:40:16 +00:00
twiz@google.com
59a190bcab
Implementation of a GL-virtualization layer for Skia. This allows for
...
environments using skia to specify a GL implementation at run-time, instead of
relying on the linker to pull in the appropriate GL impl.
A new structure, GrGLInterface is exposed. This struct contains a set of
function pointers that should point to an appropriate GL implementation.
This change also removes the reliance on GLew on windows builds.
Review: http://codereview.appspot.com/4254059/
git-svn-id: http://skia.googlecode.com/svn/trunk@937 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-03-14 21:23:01 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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