senorblanco@chromium.org
894790d77c
This patch implements the diffuse and specular lighting filters in Ganesh.
...
There are three light types for each: distant, point and spot, whose code
generation lives in a GrGLLight class hierarchy. This similar to the CPU
implementation, where each light type provides a function to compute the vector
from the surface plane to the light (surfaceToLight) and to compute the light
colour (emitLightColour). Instead of templated member functions, as in the CPU
implementation, these are virtual functions to emit the light-specific GLSL
code.
All of the code for the GPU path lives in the same file as that for the CPU
path, SkLightingImageFilter.cpp. In order to provide Ganesh a hook to access
it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image
filter to return a GrCustomStage representing that filter.
Note that this patch does not handle the border conditions correctly (the
[top|bottom][Left|Right]Normal() functions in the CPU implementation). That
will come in a future patch.
Review URL: http://codereview.appspot.com/6345081/
git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 16:01:22 +00:00
bsalomon@google.com
eb715c8d5c
VariableVisibility -> ShaderType
...
Review URL: http://codereview.appspot.com/6344103/
git-svn-id: http://skia.googlecode.com/svn/trunk@4534 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 15:03:31 +00:00
bsalomon@google.com
f3ccda7d4f
Fix assumption that enabled stage implies texture is present
...
Review URL: http://codereview.appspot.com/6353087/
git-svn-id: http://skia.googlecode.com/svn/trunk@4532 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 14:56:33 +00:00
tomhudson@google.com
cb325ceda1
Change TextContext handling of stages and draw targets; this allows us to
...
assert in GrContext::setPaint() that all stages are disabled every time
the paint is set.
Watch for possible performance implications.
http://codereview.appspot.com/6347043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4531 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 14:41:19 +00:00
epoger@google.com
96dde45518
whitespace change to trigger Skia buildbots after master update/restart
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4530 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 13:47:04 +00:00
bsalomon@google.com
3a52d68b40
Revert SkNO_RETURN_HINT fix in favor of a simpler fix
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4529 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 13:30:08 +00:00
bsalomon@google.com
22f0761d78
Fix SkNO_RETURN_HINT warnings on mac/clang
...
Review URL: http://codereview.appspot.com/6392048/
git-svn-id: http://skia.googlecode.com/svn/trunk@4528 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 12:52:04 +00:00
bsalomon@google.com
38034861d6
Commit baselines for convexpaths GM.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4527 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 12:45:23 +00:00
mike@reedtribe.org
bad1b2ff1d
add SkPath::contains(x, y)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4526 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 01:51:33 +00:00
bsalomon@google.com
927ee823fc
Rebaseline due to r4518.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4525 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 21:56:41 +00:00
bungeman@google.com
37946b5b2e
Move animated view headers to correct directory.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4524 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 21:54:31 +00:00
rileya@google.com
ab2fe82840
Replace all instances of 'clear' with 'pop's in conical gradient pdf impl, looks like the pdf spec doesn't support Postscript's 'clear' stack operator. Should fix some warnings on mac buildbots.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4521 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 20:41:38 +00:00
rileya@google.com
6219728eec
Added pdf implementation of conical gradient.
...
Also fixed an erroneous comment in the gpu implementation.
Review URL: https://codereview.appspot.com/6351076
git-svn-id: http://skia.googlecode.com/svn/trunk@4520 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 20:05:23 +00:00
keyar@chromium.org
a4091ba864
Each benchmark that needs a bitmap will now make its own.
...
Before, the bitmaps were created and then passed to the benchmark. However, some benchmarks in the future will not require bitmaps. This will remove the necessity of passing around an extraneous bitmap to those tests.
Review URL: https://codereview.appspot.com/6356081
git-svn-id: http://skia.googlecode.com/svn/trunk@4519 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 19:53:59 +00:00
bsalomon@google.com
a51ab8416d
Preserve convex control point polygon in cubic->quadratic approximation
...
GM test modified, will require rebaselining.
Review URL: http://codereview.appspot.com/6355088/
git-svn-id: http://skia.googlecode.com/svn/trunk@4518 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 19:53:34 +00:00
reed@google.com
e2589aeebf
Change SkFlatData to have a sentinel value, allowing the Compare function to
...
not need a loop-end-test.
Review URL: https://codereview.appspot.com/6355086
git-svn-id: http://skia.googlecode.com/svn/trunk@4517 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 19:38:01 +00:00
keyar@chromium.org
0665f25b31
bench_pictures can now take percentages for tiling width and height.Review URL: https://codereview.appspot.com/6354074
...
Review URL: https://codereview.appspot.com/6354074
git-svn-id: http://skia.googlecode.com/svn/trunk@4516 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 18:30:18 +00:00
bsalomon@google.com
4eefe6132c
Handle convex paths with degeneracies in cheap direction computation
...
Review URL: http://codereview.appspot.com/6349085/
git-svn-id: http://skia.googlecode.com/svn/trunk@4515 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 18:28:12 +00:00
bsalomon@google.com
f0a104e6f1
Remove GrStringBuilder
...
Review URL: http://codereview.appspot.com/6343093/
git-svn-id: http://skia.googlecode.com/svn/trunk@4514 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:51:07 +00:00
robertphillips@google.com
5c0b3134ab
r4511 with handling for the Mac-specific CAN_IMAGE_PDF path
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4513 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:50:00 +00:00
robertphillips@google.com
41f9e6e45d
Fix to get r4511 compiling in Debug
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4512 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:41:27 +00:00
robertphillips@google.com
59f46b81f8
Fixed Windows compiler complaints
...
http://codereview.appspot.com/6392044
git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:30:58 +00:00
tomhudson@google.com
676e66096c
More carefully disable stages in Ganesh to avoid textures or effects
...
leaking between draw calls.
http://codereview.appspot.com/6353083/
git-svn-id: http://skia.googlecode.com/svn/trunk@4510 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:21:48 +00:00
bsalomon@google.com
313f019287
Don't call glTexSubImage2D w/ indexed texture format on desktop GL
...
Review URL: http://codereview.appspot.com/6374048/
git-svn-id: http://skia.googlecode.com/svn/trunk@4509 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:21:02 +00:00
bungeman@google.com
b6981559ec
Fix variants in bench graphs.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4508 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 15:31:52 +00:00
keyar@chromium.org
2724ae0bb1
bench_pictures will now output the number of tiles for a tiled benchmark.
...
Review URL: https://codereview.appspot.com/6387044
git-svn-id: http://skia.googlecode.com/svn/trunk@4507 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 15:13:21 +00:00
bsalomon@google.com
52544c7cb6
Remove redundant vlayout masks and wasted vlayout bits
...
Review URL: http://codereview.appspot.com/6345080/
git-svn-id: http://skia.googlecode.com/svn/trunk@4506 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 15:06:59 +00:00
chudy@google.com
f927f44a29
Bug Fix: Pause drawing execution feature works due to fixed typo
...
Review URL: https://codereview.appspot.com/6349086
git-svn-id: http://skia.googlecode.com/svn/trunk@4505 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 14:36:14 +00:00
chudy@google.com
b9ddd4e9f1
Bug Fix: Current command mask now dynamically changes based on bounds of window.
...
Review URL: https://codereview.appspot.com/6384044
git-svn-id: http://skia.googlecode.com/svn/trunk@4504 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 14:14:50 +00:00
reed@google.com
b4ed0178d0
bug fix: take the fAllocSize into account when we perform the compare, otherwise
...
we can read past the end of one of the flatdatas if we're unlucky.
git-svn-id: http://skia.googlecode.com/svn/trunk@4503 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 13:29:52 +00:00
chudy@google.com
c432f00a84
Made everything in SkDebuggerGUI live on the stack
...
Review URL: https://codereview.appspot.com/6389043
git-svn-id: http://skia.googlecode.com/svn/trunk@4502 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 13:19:25 +00:00
reed@google.com
7fe6409ecb
change unique_paint_dictionary to change the paint randomly, instead of just
...
incrementing a value, to avoid accidental best/worst case behavior on our
insertion sort.
git-svn-id: http://skia.googlecode.com/svn/trunk@4501 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 13:17:45 +00:00
rileya@google.com
0a946d9000
Added GM baseline images for new gradient tests.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4498 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 21:20:57 +00:00
keyar@chromium.org
a6318194df
skdiff now has the option to not print out the directories it is using.
...
Further, test_pictures.py will call skdiff with this option.
Review URL: https://codereview.appspot.com/6347066
git-svn-id: http://skia.googlecode.com/svn/trunk@4497 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 21:01:50 +00:00
junov@chromium.org
9fa4d0cca9
Adding sanity checks on restore offsets in SkPicturePlayback::draw
...
Review URL: http://codereview.appspot.com/6382044/
BUG=http://code.google.com/p/chromium/issues/detail?id=133432
git-svn-id: http://skia.googlecode.com/svn/trunk@4496 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:53:37 +00:00
rmistry@google.com
bcf0c5229c
* Adding arguments to specify the working directory and whether the script should try to commit at the end.
...
* Redirecting doxygen output to a last_run_output.txt file.
* Maintaining backwards compatibility.
Context-
This CL is a preparatory CL for the housekeeping slave. The slave will use this script to update Doxygen docs. The script will not be used to commit and instead the slave will call AddMergeIntoSvn to commit.
Review URL: https://codereview.appspot.com/6348076
git-svn-id: http://skia.googlecode.com/svn/trunk@4495 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:53:03 +00:00
chudy@google.com
7dcae67cae
Added stubs for zoom info panel.
...
Review URL: https://codereview.appspot.com/6350071
git-svn-id: http://skia.googlecode.com/svn/trunk@4493 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:26:53 +00:00
tomhudson@google.com
c377baf406
Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.
...
TODO: unify with the placement new implementation in SkTemplatesPriv.h,
once various issues there are overcome. reed@ should be taking the lead
there.
http://codereview.appspot.com/6384043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:17:56 +00:00
keyar@chromium.org
70b4222344
Tiles that extend beyond the picture are now clipped.
...
Review URL: https://codereview.appspot.com/6352078
git-svn-id: http://skia.googlecode.com/svn/trunk@4491 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 19:51:05 +00:00
keyar@chromium.org
cf6c44cf92
Added a sgpipe benchmark.
...
Review URL: https://codereview.appspot.com/6349070
git-svn-id: http://skia.googlecode.com/svn/trunk@4490 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 19:37:40 +00:00
tomhudson@google.com
2c026196e7
Fix misnamed function in explanatory comment.
...
http://codereview.appspot.com/6387043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4489 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 19:07:41 +00:00
keyar@chromium.org
c3d5831e05
Allow specific files and multiple inputs for picture testing tools.
...
Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified.
Unit tests have also been added for picture_utils.cpp.
Committed http://code.google.com/p/skia/source/detail?r=4486
Review URL: https://codereview.appspot.com/6345054
git-svn-id: http://skia.googlecode.com/svn/trunk@4488 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:44:51 +00:00
keyar@chromium.org
d1dc920097
Allow specific files and multiple inputs for picture testing tools.
...
Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified.
Unit tests have also been added for picture_utils.cpp.
Review URL: https://codereview.appspot.com/6345054
git-svn-id: http://skia.googlecode.com/svn/trunk@4486 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:32:08 +00:00
senorblanco@chromium.org
3a67a668db
Add an SK_PRINTF_LIKE macro, which declares a function to have printf-like
...
semantics, allowing gcc and clang to check the format string against the
arguments. Enable its use on SkString (printf, appendf, and prependf). Also
define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of
printing a size_t.
Review URL: http://codereview.appspot.com/6375043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4485 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:22:08 +00:00
tomhudson@google.com
1dcfa1fcbd
Fix definition of isEqual() for two gradient effect custom stages.
...
Expand comments defining isEqual() to better distinguish equality from
equivalence, which is more significant in Ganesh shader cache management.
http://codereview.appspot.com/6379043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4484 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:21:28 +00:00
bungeman@google.com
8cd5ae79c6
Fix SkBlendLCD16_SSE2 for non ARGB platforms.
...
http://codereview.appspot.com/6356062/
git-svn-id: http://skia.googlecode.com/svn/trunk@4481 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:44:57 +00:00
reed@google.com
142e1fe7cf
restore 4478 w/ fixed assert (no long need 8-byte alignment)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4480 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:44:44 +00:00
reed@google.com
fc8581b2d8
revert 4478
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4479 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:40:48 +00:00
reed@google.com
f8affe5adf
switch callers to SkChecksum::Compute (no 32/64 preference)
...
Review URL: https://codereview.appspot.com/6377043
git-svn-id: http://skia.googlecode.com/svn/trunk@4478 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:05:51 +00:00
reed@google.com
de1cf48790
remove until PDF understands conical gradients.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4477 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 16:45:49 +00:00