reed@google.com
921374d4cc
for scalar==float, tis faster to always to MIN and MAX, than to put an ELSE
...
betwixt them.
if (x < min) min = x; else if (x > max) max = x;
This expression forces the compiler to know if the min expression executed, and
insert a conditional jump before the max. Slow.
if (x < min) min = x; if (x > max) max = x;
This version allows the compiler to emitt MINSS and MAXSS unconditionally, giving
us a loop with zero branches inside.
git-svn-id: http://skia.googlecode.com/svn/trunk@3939 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 15:12:29 +00:00
epoger@google.com
a2b793c4d1
Add self-test for skdiff, and remove date/time from skdiff output so it passes.
...
BUG=http://code.google.com/p/skia/issues/detail?id=612
Review URL: https://codereview.appspot.com/6198074
git-svn-id: http://skia.googlecode.com/svn/trunk@3938 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:58:53 +00:00
reed@google.com
415e76a760
fix Fixed build
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3937 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:32:42 +00:00
reed@google.com
30d90ebe7c
Use x*0 instead of x!=x to detect non-finite values, since x*0 also detects infinities
...
and it is faster (at least faster in SkRect::set).
Add unittest for SkRect::set to see that it correctly detects NaN and infinities.
git-svn-id: http://skia.googlecode.com/svn/trunk@3936 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:17:36 +00:00
reed@google.com
63c57613b8
add test for computing the bounds of an array of points (SkRect::set)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3935 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:14:04 +00:00
reed@google.com
2e0d727942
pre allocate space for the result (guesstimation) so we don't spend extra time
...
re-growing while we build the stroke.
git-svn-id: http://skia.googlecode.com/svn/trunk@3934 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 13:33:57 +00:00
reed@google.com
129ec22cb0
inline the fast case for AutoDrawLoop::next() so we don't slow down simple
...
draws like drawRect (with no fancy effects)
git-svn-id: http://skia.googlecode.com/svn/trunk@3933 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 13:24:09 +00:00
reed@google.com
9f63667ff2
special-case filling narrow rects, where we can be faster than the SSE2 asm
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3932 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 13:07:48 +00:00
robertphillips@google.com
b4f06d7605
Minor refactoring/enhancement of GrSWMaskHelper to prepare for wider use
...
http://codereview.appspot.com/6188082/
git-svn-id: http://skia.googlecode.com/svn/trunk@3931 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 12:10:05 +00:00
epoger@google.com
15b5167a2d
Rename tests/images dir as tests/skdiff
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3930 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 20:19:42 +00:00
bsalomon@google.com
382322ccff
Fix warnings in GrGLInterface mac setup, ignoring proc addr returns. There should be no functional change as these all return NULL on 10.6 and 10.7.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3929 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 20:08:39 +00:00
tomhudson@google.com
9c639a406e
Move coordDims, varyingDims onto GrGLShaderBuilder.
...
http://codereview.appspot.com/6201083/
git-svn-id: http://skia.googlecode.com/svn/trunk@3928 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 19:58:06 +00:00
robertphillips@google.com
ff17584e1c
Attached ClipMaskManager to GPU resource freeing system
...
http://codereview.appspot.com/6208058/
git-svn-id: http://skia.googlecode.com/svn/trunk@3927 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 19:31:39 +00:00
robertphillips@google.com
706f6212c6
Fixes for Windows Release compiler complaints (overflow in const arith)
...
http://codereview.appspot.com/6210056/
git-svn-id: http://skia.googlecode.com/svn/trunk@3926 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 17:51:23 +00:00
robertphillips@google.com
6f31a3b7d7
Created SW clip mask creation helper class (in GrSoftwarePathRenderer)
...
http://codereview.appspot.com/6198070/
git-svn-id: http://skia.googlecode.com/svn/trunk@3925 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 17:37:05 +00:00
robertphillips@google.com
4debcac8c3
Debug Windows compiler complaint fixes
...
http://codereview.appspot.com/6208055/
git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 16:33:36 +00:00
bungeman@google.com
59bc8d4fa7
Android does not support pthread_cancel / pthread_testcancel.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3923 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 15:40:05 +00:00
epoger@google.com
620c3b4a9f
Images for testing skdiff tool
...
Review URL: https://codereview.appspot.com/6208056
git-svn-id: http://skia.googlecode.com/svn/trunk@3922 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 15:38:57 +00:00
bungeman@google.com
5548752100
Add bench and test for SkRefCnt.
...
http://codereview.appspot.com/6195071/
This also adds a cross platform SkThread for testing purposes.
git-svn-id: http://skia.googlecode.com/svn/trunk@3921 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 14:09:24 +00:00
robertphillips@google.com
f105b10926
Made clip mask cache use Scratch Texture system
...
http://codereview.appspot.com/6210044/
git-svn-id: http://skia.googlecode.com/svn/trunk@3920 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 12:18:26 +00:00
reed@google.com
18c464b460
update the nearly_integral calculation to be (a) faster, and (b) to correctly
...
identify that the AA granularity is 1/4 of a pixel, not 1/16 (along an axis).
git-svn-id: http://skia.googlecode.com/svn/trunk@3919 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 20:57:25 +00:00
bsalomon@google.com
5adf9b2e98
Remove a dead function and dead var that were incorrectly left in by previous partial-reverts
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3918 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 20:50:53 +00:00
bsalomon@google.com
341767c9fc
Remove support for vertex attribute matrices
...
Review URL: http://codereview.appspot.com/6200065/
git-svn-id: http://skia.googlecode.com/svn/trunk@3917 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 20:47:39 +00:00
tomhudson@google.com
f9ad8867f2
Extract ShaderCodeSegments from GrGLProgram into a new class,
...
GrGLShaderBuilder. Begin populating its interface.
Requires gyp changes.
http://codereview.appspot.com/6197076/
git-svn-id: http://skia.googlecode.com/svn/trunk@3916 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 20:38:48 +00:00
reed@google.com
420f74fa72
only check for nearly-integral if we're a BW clip
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3915 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 18:46:43 +00:00
epoger@google.com
3d8cd175e1
Discard absurd values (and log warnings) when graphing bench results.
...
BUG=http://code.google.com/p/skia/issues/detail?id=596
Review URL: https://codereview.appspot.com/6197066
git-svn-id: http://skia.googlecode.com/svn/trunk@3914 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 18:26:16 +00:00
reed@google.com
7096dc6b27
fix SK_RESTRICT warnings related to overrides on windows
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3913 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 18:01:50 +00:00
bsalomon@google.com
7ffe6810c6
Remove tesselated path renderer and supporting code, glu, and libtess target
...
Review URL: http://codereview.appspot.com/6197075/
git-svn-id: http://skia.googlecode.com/svn/trunk@3912 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 17:32:43 +00:00
robertphillips@google.com
6b70a7bd33
Split createAlphaClipMask in two to allow reuse with SW-only path
...
http://codereview.appspot.com/6198065/
git-svn-id: http://skia.googlecode.com/svn/trunk@3910 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 15:32:48 +00:00
reed@google.com
880dc472ab
add dox for Shaders, and how the paint's alpha modulates the shader's colors.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3909 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 14:47:03 +00:00
reed@google.com
4588490048
lazily make a copy of the paint when choosing a blitter. For simple draws,
...
this is never actually needed, and it is faster to skip the copy.
git-svn-id: http://skia.googlecode.com/svn/trunk@3908 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 14:38:51 +00:00
reed@google.com
a1c6ff4922
inline isEmpty and isRect (faster)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3907 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 14:36:57 +00:00
reed@google.com
7324415759
use mapPoints instead of mapXY for the 2 corners of a rect (faster)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3906 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 14:35:23 +00:00
djsollen@google.com
39a7475179
Set no rtti option to avoid warnings on Android.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3905 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 13:29:32 +00:00
robertphillips@google.com
f21c704119
fix for r3903 compilation issue
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3904 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 13:01:16 +00:00
robertphillips@google.com
8fff356c85
Made clip mask cache reuse depend on mask size/bounds (instead of render target size)
...
http://codereview.appspot.com/6190067/
git-svn-id: http://skia.googlecode.com/svn/trunk@3903 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 12:53:50 +00:00
robertphillips@google.com
d82f3fae92
Fix for Android ClipCache unit test crash
...
http://codereview.appspot.com/6199063/
git-svn-id: http://skia.googlecode.com/svn/trunk@3902 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 21:26:48 +00:00
tomhudson@google.com
720faa4b5d
Reactivate SSSE3 optimizations, undoing r3770.
...
This will break Android x86 clients; they will need to work around, and
hopefully can resubmit a patch to do so that doesn't disable SSSE3 on
all other platforms (20-30% performance penalty).
http://codereview.appspot.com/6201070/
git-svn-id: http://skia.googlecode.com/svn/trunk@3901 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 18:39:15 +00:00
robertphillips@google.com
50b8eadb9f
Reverting r3898 due to Android failures
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3900 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 16:17:58 +00:00
djsollen@google.com
fc9054d4dc
Use a NDK-compliant way of reading locale.
...
Remove !SK_BUILD_FOR_ANDROID_NDK from locale-related code
git-svn-id: http://skia.googlecode.com/svn/trunk@3899 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 16:13:38 +00:00
robertphillips@google.com
c3e050f322
Re-enabling ClipCache unit test which now runs on Xoom w/ new tool chain
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3898 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 15:56:17 +00:00
reed@google.com
ef85e3c52c
add experimental variant of dashing, where we explicitly draw rects
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3897 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 15:40:57 +00:00
robertphillips@google.com
7a39633318
Fixed GrContext.cpp Windows compiler complaints
...
http://codereview.appspot.com/6198051/
git-svn-id: http://skia.googlecode.com/svn/trunk@3895 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 15:11:27 +00:00
robertphillips@google.com
5d64068a36
Warn if return values from SkRect's Make* methods are ignored
...
http://codereview.appspot.com/6200060/
git-svn-id: http://skia.googlecode.com/svn/trunk@3894 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 14:50:44 +00:00
reed@google.com
7e6c4d1601
add SkPath::isLine(), similar to isRect()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3892 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 14:05:43 +00:00
reed@google.com
963a8fa542
remove (unused) reference to SkStrokePathEffect
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3891 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 13:04:59 +00:00
reed@google.com
75a0972dd7
move SkStrokePathEffect into hiding for now, as its functionality is rethought.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3890 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 12:56:16 +00:00
tomhudson@google.com
f1d88064bc
Windows build fixes from r3887.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3889 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 12:43:21 +00:00
robertphillips@google.com
bf5cad4e9c
Added documentation of stage/TU allocation
...
http://codereview.appspot.com/6199058/
git-svn-id: http://skia.googlecode.com/svn/trunk@3888 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 12:40:40 +00:00
tomhudson@google.com
d8f856c32b
Move convolution from code in GrGLProgram to new GrConvolutionEffect
...
class. This is the first test of the new Ganesh shader pipeline.
Also includes some cleanup of the gpu.gyp file: added src/gpu, allowing
us to remove ../ from many #include directives.
http://codereview.appspot.com/6199053/
git-svn-id: http://skia.googlecode.com/svn/trunk@3887 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 12:13:36 +00:00