tomhudson@google.com
ea85494f92
Use intrinsics instead of inline assembly for detecting CPU ID & SSE2/3 support
...
on 64-bit builds in MS Visual Studio 2010.
Original code provided by jianliang79.
http://code.google.com/p/skia/issues/detail?id=600
git-svn-id: http://skia.googlecode.com/svn/trunk@3991 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 15:09:17 +00:00
reed@google.com
54bf33f5cc
reuse() is no longer available, call reset()
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3990 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 14:29:39 +00:00
reed@google.com
ebd24962df
change SkChunkAlloc to grow its allocations geometrically (not linearly)
...
plus add a bench and unittest for it.
git-svn-id: http://skia.googlecode.com/svn/trunk@3989 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 14:28:11 +00:00
reed@google.com
ff793db2ef
move Release build to -O3 (from -O2)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3988 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 13:58:26 +00:00
reed@google.com
803c67dbd7
change SetTLSFontCacheLimit to be void, since it doesn't easily know the prev value
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3987 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 13:50:36 +00:00
reed@google.com
6172d67d1c
Allow font-cache to use thread_local_storage for a private cache
...
Review URL: https://codereview.appspot.com/6200051
git-svn-id: http://skia.googlecode.com/svn/trunk@3986 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 13:38:03 +00:00
reed@google.com
ff0da4ff48
Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all
...
pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b)
most subclasses use the same mutex for *all* of their instances, even when there
is no explicit need to guard modifying one instances with another.
When we try drawing bitmaps from multiple threads, we are seeing a lot of slow-
down from these mutexes. This CL has two changes to try to speed things up.
1. Add setPreLocked(), for pixelrefs who never need the onLockPixels
virtual to be called. This speeds up those subclasses in multithreaded environs
as it avoids the mutex lock all together (e.g. SkMallocPixelRef).
2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants
this, since its unflattening constructor cannot pass down the null, it needs
to cleanup afterwards.
Review URL: https://codereview.appspot.com/6199075
git-svn-id: http://skia.googlecode.com/svn/trunk@3985 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 13:14:52 +00:00
robertphillips@google.com
fa66294c77
First functioning version of SW-only clip mask creator
...
http://codereview.appspot.com/6208072/
git-svn-id: http://skia.googlecode.com/svn/trunk@3984 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 12:20:22 +00:00
robertphillips@google.com
5acc0e36d9
Free cached AA clip mask when create hard/stencil clip mask
...
http://codereview.appspot.com/6214050/
git-svn-id: http://skia.googlecode.com/svn/trunk@3983 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 12:01:02 +00:00
bungeman@google.com
526956644a
Add 'inline' to suppress unused warnings with Android NDK build.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3982 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 20:37:39 +00:00
reed@google.com
73a025811c
computeFastStrokeBounds needs to pass kStroke_Style instead of kFill_Style (ya think?)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3981 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 19:21:12 +00:00
reed@google.com
115d931d2f
pass the region-op to the clipstack for SkCanvas::clipRegion.
...
we were defaulting to intersect all the time (doh).
git-svn-id: http://skia.googlecode.com/svn/trunk@3980 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 18:50:40 +00:00
bungeman@google.com
20a0477009
Fix new atomic declarations for Android.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3979 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 18:37:31 +00:00
bungeman@google.com
a02bc1519c
WeakRefCnt
...
http://codereview.appspot.com/5649046/
git-svn-id: http://skia.googlecode.com/svn/trunk@3978 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 18:21:56 +00:00
epoger@google.com
b2aacb6dc2
test-only changes: add more image files to test more skdiff behavior
...
Tests output order for very vs. slightly different pixels, very vs. slightly different image sizes, etc.
TBR=tomhudson@google.com
Review URL: https://codereview.appspot.com/6213049
git-svn-id: http://skia.googlecode.com/svn/trunk@3977 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 18:06:54 +00:00
reed@google.com
32aa01e2fe
remove unused variable (isNaN)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3976 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 17:56:09 +00:00
epoger@google.com
6600852667
skdiff: only write out diff images that are included in index.html
...
Not only are those files unnecessary, in some different-image-size cases, their contents are nondeterministic!
Review URL: https://codereview.appspot.com/6208073
git-svn-id: http://skia.googlecode.com/svn/trunk@3975 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 17:40:57 +00:00
reed@google.com
4a3b714d73
Iter::next takes a bool (defaults to true for now) if we want to consume degenerates.
...
path-filling and stroking pass false, as they already are written to handle
small segments (and it makes next() run 2x faster if you pass false).
Review URL: https://codereview.appspot.com/6214049
git-svn-id: http://skia.googlecode.com/svn/trunk@3974 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 17:16:46 +00:00
epoger@google.com
292aff6aca
Make skdiff use enumeration of result types instead of separate booleans for each result type.
...
This is one step on the way to a more robust version of skdiff that we can use to address http://code.google.com/p/skia/issues/detail?id=473 ('PDF gradtext gm image results are nondeterministic')
I have confirmed that skdiff results will not change, using tools/tests/run.sh.
Review URL: https://codereview.appspot.com/6208063
git-svn-id: http://skia.googlecode.com/svn/trunk@3972 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 14:57:28 +00:00
tomhudson@google.com
d4caa2b5a9
Disable SSSE3 for Android x86 *ONLY*.
...
First attempt to do this inadvertently turned it off for everyone;
watch performance numbers. New benchmarks from r3963 should give us
coverage.
http://codereview.appspot.com/6198069/
git-svn-id: http://skia.googlecode.com/svn/trunk@3970 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 14:19:46 +00:00
reed@google.com
d5f20797e1
can't make the compute-bounds methods private yet :(
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3969 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 14:15:02 +00:00
reed@google.com
a584aed5f7
perform quickReject in drawPoints (which is called by drawLine) just like we
...
already did in drawRect and drawPath
git-svn-id: http://skia.googlecode.com/svn/trunk@3968 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 14:06:02 +00:00
reed@google.com
7b463acd46
speedup SkRect::isFinite() (almost 2x)
...
add SkRect:set(p0, p1) for quick bounds of 2 points
git-svn-id: http://skia.googlecode.com/svn/trunk@3967 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 13:35:36 +00:00
reed@google.com
5dd510f1d2
update dox for copy-constructor
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3966 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 13:04:22 +00:00
chudy@google.com
93d63d312e
Added baseline golden master images for nexus s.
...
Review URL: https://codereview.appspot.com/6209068
git-svn-id: http://skia.googlecode.com/svn/trunk@3965 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 20:55:52 +00:00
reed@google.com
e4f10a7080
add computeFastBounds to SkPathEffect, so we can attempt quickReject
...
Review URL: https://codereview.appspot.com/6209070
git-svn-id: http://skia.googlecode.com/svn/trunk@3964 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 20:47:50 +00:00
tomhudson@google.com
c3be34d4db
Add (8) more benchmarks to capture performance of a pair of blit optimization
...
procs.
http://codereview.appspot.com/6209064/
git-svn-id: http://skia.googlecode.com/svn/trunk@3963 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 20:09:33 +00:00
robertphillips@google.com
58d4c816ab
Adding baseline images for new complexclip2 variants and samplerstress GM
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3962 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 19:51:48 +00:00
reed@google.com
4ad2275350
add clipped case for dashing to exercise quickReject
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3961 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 19:50:58 +00:00
reed@google.com
97ecd1d454
update dox for measureText
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3960 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 19:25:17 +00:00
reed@google.com
e346c8e956
update baseline
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3959 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 19:03:36 +00:00
reed@google.com
59b4519b67
add new images for new test
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3958 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 18:55:31 +00:00
reed@google.com
58cf1c1390
rebaseline after 3943
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3956 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 18:53:52 +00:00
robertphillips@google.com
b76c573def
Updating complexclip2 baseline images in response to r3943
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3949 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 18:20:20 +00:00
reed@google.com
4b2d3f30d0
make "Partial pixel coverage will be incorrectly blended" debug message conditional
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3945 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 18:05:50 +00:00
reed@google.com
9e25dbf589
remove null-check in SKPath::Iter::next() -- not needed, and slows us down a little
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3944 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 17:05:38 +00:00
robertphillips@google.com
2470b25ac8
Updated AAClips Sample slide and complexclip2 GM to exercise AA clipping
...
http://codereview.appspot.com/6212047/
will require image rebaselining
git-svn-id: http://skia.googlecode.com/svn/trunk@3943 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 17:03:16 +00:00
robertphillips@google.com
6623fcd1ee
Convert AAClipCache's GrRects to GrIRects
...
http://codereview.appspot.com/6210057/
git-svn-id: http://skia.googlecode.com/svn/trunk@3942 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 16:47:23 +00:00
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