bsalomon@google.com
f2d91557b2
separate coverage stages from color stages.
...
Review URL: http://codereview.appspot.com/4538064/
git-svn-id: http://skia.googlecode.com/svn/trunk@1339 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 20:56:06 +00:00
junov@google.com
6acc9b3d2b
Fixed color bleeding issue when drawing a sub region of a bitmap with filtering enabled.
...
Problem was resolved by adding the notion of a custom texture domain in generated shaders, when necessary.
git-svn-id: http://skia.googlecode.com/svn/trunk@1337 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 18:32:07 +00:00
reed@google.com
07f3ee10d3
use SkPath for GrPath, removing GrPathIter entirely
...
http://codereview.appspot.com/4515071/
git-svn-id: http://skia.googlecode.com/svn/trunk@1335 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 17:21:57 +00:00
senorblanco@chromium.org
ff174b3947
Fix winding order check for negative scale in tesselated path rendering. The
...
isCCW() code in GrTesselatedPathRenderer was using untransformed vertices,
which fails for transforms with negative scale. Doing the check after
transformation fixes it. This was causing some missing geometry in the
PolyToPoly and Shapes tests in SampleApp.
Review URL: http://codereview.appspot.com/4545049/
git-svn-id: http://skia.googlecode.com/svn/trunk@1334 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 16:59:57 +00:00
bsalomon@google.com
27a4dc4c36
Upload matrix as gl float rather than gr scalar (fixes a build break when scalar==fixed)
...
Review URL: http://codereview.appspot.com/4516051/
git-svn-id: http://skia.googlecode.com/svn/trunk@1329 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-16 13:14:03 +00:00
bsalomon@google.com
12ad3aa49b
Disable blend for edge AA not general AA
...
Review URL: http://codereview.appspot.com/4526051/
git-svn-id: http://skia.googlecode.com/svn/trunk@1316 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-12 20:34:19 +00:00
Scroggo
5d7574099b
Style fix
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1315 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-12 18:27:05 +00:00
senorblanco@chromium.org
92e0f222fb
Edge antialiasing for convex shapes in Ganesh
...
This patch implements edge antialiasing for convex shapes, using the fragment
shader to compare against the edge equations for each triangle. Currently, it
only works for flat shaded primitives (i.e., it was not integrated into the
"active stages" path). The skia.gyp changes cause this code to be compiled into
SampleApp, but do not enable the tesselated path by default.
Notes: the SkOSWindow_Unix.cpp change is to silence a valgrind warning about
memcpy() with overlapping regions. The GrBinHashKey change is to avoid running
a two-pass hash (GrProgramDesc is now 52 bytes or so, exceeding the 32 byte
default size).
Review URL: http://codereview.appspot.com/4519054/
git-svn-id: http://skia.googlecode.com/svn/trunk@1314 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-12 15:49:15 +00:00
Scroggo
0bad67303d
Allow blending if there is a color filter.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1309 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 20:25:01 +00:00
bsalomon@google.com
dcf1b0b0ab
Add space between mediump and float in 2pt radial vertex uniform decl
...
Review URL http://codereview.appspot.com/4544041/
git-svn-id: http://skia.googlecode.com/svn/trunk@1308 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 19:00:54 +00:00
Scroggo
a8a57be564
Remove a warning.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1303 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 18:16:56 +00:00
Scroggo
01b87ec6a6
Store 1/255 as a constant to reduce number of divides.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1301 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 18:05:38 +00:00
Scroggo
25a61c37b7
Remove unused variable.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1299 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 17:04:25 +00:00
bsalomon@google.com
2d9ddf9df1
Keep program cache consistent when program creation fails.
...
Review URL: http://codereview.appspot.com/4523056/
git-svn-id: http://skia.googlecode.com/svn/trunk@1298 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 16:52:59 +00:00
Scroggo
97c88c255c
Add color filters to gpu path.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1297 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-11 14:05:25 +00:00
bsalomon@google.com
cc4dac3dac
Make GrMatrix an alias of SkMatrix. Add new methods to SkMatrix.
...
Review URL: http://codereview.appspot.com/4538043/
Checked in on behalf of reed@ with some additional work (remove the do-nother sk->gr matrix converter).
git-svn-id: http://skia.googlecode.com/svn/trunk@1289 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-10 13:52:42 +00:00
bsalomon@google.com
72b4fcb587
Fix unused var warning
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1285 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 20:47:34 +00:00
bsalomon@google.com
55b4e8038d
remove deleted include file (oops)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1283 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 18:50:47 +00:00
bsalomon@google.com
b9afba3193
Remove previous shader generator class. No longer compiles due to elimination of separate GrStringBuilder class in favor or SkString.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1282 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 18:44:52 +00:00
bsalomon@google.com
9196130af8
Make shader generator more legible. Get rid of some magic values.
...
Review URL: http://codereview.appspot.com/4531043/
git-svn-id: http://skia.googlecode.com/svn/trunk@1281 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 18:39:58 +00:00
reed@google.com
20efde71b4
Share code with SkRect
...
http://codereview.appspot.com/4523046/
git-svn-id: http://skia.googlecode.com/svn/trunk@1277 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 17:00:02 +00:00
reed@google.com
59f9961d00
remove #if 0 code
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1276 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 13:37:36 +00:00
bsalomon@google.com
1da0e5e26c
Suppress int/NULL comparison warning
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1275 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-09 13:28:55 +00:00
reed@google.com
7744c205f2
use SkPoint, creating an alias for GrPoint
...
http://codereview.appspot.com/4498041/
git-svn-id: http://skia.googlecode.com/svn/trunk@1268 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-06 19:26:26 +00:00
reed@google.com
2e550127e6
share macros and types with SkScalar, but keep aliases for now, to avoid editing
...
call sites.
git-svn-id: http://skia.googlecode.com/svn/trunk@1267 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-06 17:30:45 +00:00
bsalomon@google.com
fc29629525
Replace GrStringBuilder with SkString. First step in cleaning up the shader generator. Slight performance hit when creating a new shader (<10% of total shader gen time on my Windows box is spent in building our string before handing it to GL). Much of this can be recovered by better usage pattern of SkString in coming revisions.
...
Review URL: http://codereview.appspot.com/4465053/
git-svn-id: http://skia.googlecode.com/svn/trunk@1266 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-06 13:53:47 +00:00
bsalomon@google.com
0292935cd4
remove unused var, fixes warning
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1265 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-06 13:12:38 +00:00
bsalomon@google.com
2ba4abbb31
Switch to GrGpuGLShaders (instead of GrGpuGLShaders2).
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1251 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-05 12:39:20 +00:00
bsalomon@google.com
6aef1fb4eb
Add 4x4 downsample filter with 4 bilinear texture reads, use for ssaa.
...
Review URL: http://codereview.appspot.com/4483042/
git-svn-id: http://skia.googlecode.com/svn/trunk@1250 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-05 12:33:22 +00:00
senorblanco@chromium.org
99c2a8b362
SampleApp builds skia on Linux with BGRA pixel order, but Ganesh's SampleApp
...
assumes GL_RGBA texture format on all platforms except Windows (where it uses
GL_BGRA), so texture colours come out wrong. As a temporary fix, do on Linux
what we do on Windows, and assume GL_BGRA. (This should be made more general
later, and the assumption of matching formats between Skia and Ganesh removed.)
Review URL: http://codereview.appspot.com/4474046/
git-svn-id: http://skia.googlecode.com/svn/trunk@1247 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 20:12:01 +00:00
senorblanco@chromium.org
2dbd0449bf
Minor fixes to get SampleApp's OpenGL path not to crash on Linux. Initialize
...
SkOSWindow::fGLAttched (and fVi while we're at it), since it was being checked
uninitialized. Don't call has_gl_extension() while initializing the
GrGLDefaultInterface, since it derefs the default interface (which is still
NULL); use has_gl_extension_from_string() instead.
Review URL: http://codereview.appspot.com/4480041/
git-svn-id: http://skia.googlecode.com/svn/trunk@1242 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 15:29:04 +00:00
bsalomon@google.com
4b9b6a20d4
Fix validation (glTexEnvi is fixed pipe only)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1241 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 15:01:16 +00:00
bsalomon@google.com
bf2a46941e
Add all ES2 glUniform functions to GrGLInterface. Add interface validation for fixed pipe or shader pipe use.
...
Review URL: http://codereview.appspot.com/4435082/
git-svn-id: http://skia.googlecode.com/svn/trunk@1234 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-04 12:35:39 +00:00
bsalomon@google.com
05ef510389
Remove GrContext.h dependence on GrGpu.h
...
Review URL: http://codereview.appspot.com/4433096/
git-svn-id: http://skia.googlecode.com/svn/trunk@1227 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-02 21:14:59 +00:00
bsalomon@google.com
8295dc1474
4x4 SSAA with improvements in determination of when to apply. Still disabled at compile time.
...
Review URL: http://codereview.appspot.com/4445075/
git-svn-id: http://skia.googlecode.com/svn/trunk@1218 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-02 12:53:34 +00:00
junov@google.com
c97db4c40b
Fixing a simple build error in GrGpuGLShaders.cpp with GR_AGGRESSIVE_SHADER_OPTS
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1216 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-29 17:25:42 +00:00
bsalomon@google.com
d5d10494e3
Only define debugging GL globals when the code paths are enabled
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1212 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-28 21:16:31 +00:00
bsalomon@google.com
eaf6a5daf4
Make reserveAndLockGeometry set index/vertex ptr to null if none requested. We are expecting this behavior in a caller and it seems reasonable.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1210 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-28 19:22:57 +00:00
bsalomon@google.com
6a77cc5dde
Fix warnings.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1209 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-28 17:33:34 +00:00
agl@chromium.org
83747252b8
Adding newline at end of file to fix compiler error.
...
Unreviewed, build fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@1206 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-27 23:11:21 +00:00
bsalomon@google.com
06e1795cd9
Add bounding rect for paths
...
Review URL: http://codereview.appspot.com/4442094/
git-svn-id: http://skia.googlecode.com/svn/trunk@1205 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-27 21:13:04 +00:00
bsalomon@google.com
6aa25c3f55
Make Gr clear take a rect for a partial-clear
...
Review URL: http://codereview.appspot.com/4442093/
git-svn-id: http://skia.googlecode.com/svn/trunk@1203 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-27 19:55:29 +00:00
bsalomon@google.com
a47a48dca5
SSSA for drawVerts, cleanup determination of when stage is enabled
...
Review URL: http://codereview.appspot.com/4430066/
git-svn-id: http://skia.googlecode.com/svn/trunk@1195 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-26 20:22:11 +00:00
bsalomon@google.com
48ba56d5fa
Update GR_API to support non-Windows DLLs.
...
Review URL: http://codereview.appspot.com/4441067/
git-svn-id: http://skia.googlecode.com/svn/trunk@1189 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-26 17:59:32 +00:00
bsalomon@google.com
06afe7b5a1
Per-draw super sampling. Disabled, path only, 2x2 only
...
Review URL: http://codereview.appspot.com/4452048/
git-svn-id: http://skia.googlecode.com/svn/trunk@1186 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-26 15:31:40 +00:00
bsalomon@google.com
898d9e5dc6
Fix signed/unsigned warning in GrInOrderDrawBuffer.cpp
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1182 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-26 13:22:33 +00:00
bsalomon@google.com
a39f404c87
Remove sampler state param from lockKeylessTexture. It didn't serve any function and gave the false impression that tiling modes were handled on APIs with npot limitations.
...
http://codereview.appspot.com/4444061/
git-svn-id: http://skia.googlecode.com/svn/trunk@1181 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-26 13:18:16 +00:00
bsalomon@google.com
0b335c1ac1
Make clear a GrDrawTarget virtual method and implement in GrInOrderDrawBuffer
...
Review URL: http://codereview.appspot.com/4442081/
git-svn-id: http://skia.googlecode.com/svn/trunk@1176 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-25 19:17:44 +00:00
bsalomon@google.com
4711a7ae95
Remove unnecessary BindBuffers. These were needed when we used vertex arrays. Now we always use buffer objects.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@1173 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-25 18:02:58 +00:00
bsalomon@google.com
fea37b5e53
Add lockKeylessTexture() for caching texture without a content key.
...
Review URL: http://codereview.appspot.com/4440065/
git-svn-id: http://skia.googlecode.com/svn/trunk@1172 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-25 15:51:06 +00:00