digit@google.com
1771cbf43d
posix: Avoid static initializers in static/global mutexes
...
This patch removes static initializers related to static and
global mutexes from the final library's machine code when
building on a pthread-capable system.
We use PTHREAD_MUTEX_INITIALIZER to perform POD-style
initialization. You need a line like the following to declare
a global mutex with it:
SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER };
We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX
macros to be able to declare static/global mutexes in the source tree
uniformly.
SkMutex is now defined as a sub-class of SkBaseMutex, with standard
construction/destruction semantics. This is useful if the mutex
object is a member of another C++ class, or allocated dynamically.
We also modify a few places to refer to SkBaseMutex instead of a
SkMutex, where it makes sense. Generally speaking, client code
should hold and use pointers to SkBaseMutex whenever they can
now.
We defined a new built-time macro named SK_USE_POSIX_THREADS
to indicate that we're using a pthread-based SkThread.h
interface. The macro will also be used in future patches
to implement other helper thread synchronization classes.
Finally, we inline the acquire() and release() functions in the
case of Posix to improve performance a bit.
Running: 'bench -repeat 10 -match mutex' on an Android device or
a 2.4GHz Xeon Linux desktop shows the following improvements:
Before After
Galaxy Nexus 1.64 1.45
Nexus S 1.47 1.16
Xoom 1.86 1.66
Xeon 0.36 0.31
This removes 5 static mutex initializers from the library
Review URL: https://codereview.appspot.com/5501066
git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 21:26:40 +00:00
bsalomon@google.com
72b55be3f3
Change background color and add paths to convexpaths gm
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3090 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 20:33:19 +00:00
reed@google.com
8bb3ba151e
need to include SkColorFilter.h since we reference some methods on it
...
in our inline functions.
git-svn-id: http://skia.googlecode.com/svn/trunk@3089 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-26 04:13:31 +00:00
reed@google.com
6d428d3e6e
Make SkRegion::operator== a member function, rather than a privately-declared
...
friend. Without this, calling code has access to operator==, but can fail to
link because the implementation is assumed to have static linkage.
http://codereview.appspot.com/5577047/
git-svn-id: http://skia.googlecode.com/svn/trunk@3088 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-25 21:53:53 +00:00
caryclark@google.com
27accef223
Intersection work in progress
...
Review URL: https://codereview.appspot.com/5576043
git-svn-id: http://skia.googlecode.com/svn/trunk@3087 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-25 18:57:23 +00:00
caryclark@google.com
76bd2540b5
fix vertical bold text on mac
...
M src/ports/SkFontHost_mac_coretext.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@3086 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-25 16:47:04 +00:00
reed@google.com
8887be0619
disable SPEW_PURGE_STATUS
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3085 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-25 16:04:18 +00:00
epoger@google.com
0cac703cf9
whitespace change to trigger Skia buildbot
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3082 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-24 04:27:11 +00:00
bsalomon@google.com
d9ce125ec8
Prefer a texture pixel ref to a render target pixel ref when creating an SkGpuDevice
...
Review URL: http://codereview.appspot.com/5570050/
git-svn-id: http://skia.googlecode.com/svn/trunk@3081 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-24 02:31:42 +00:00
bsalomon@google.com
18ed37a8a1
Whitespace commit to check if lion / win bots are hosed.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3080 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-24 02:23:07 +00:00
bsalomon@google.com
0680961481
revert 3078
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3079 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-21 15:03:39 +00:00
bsalomon@google.com
495e210eb1
fix interior issues in convex path renderer
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3078 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-21 14:48:36 +00:00
tomhudson@google.com
13a847a82c
Temporarily allow linear interpolation of 2-color vertical gradients to be
...
turned off. With a Chromium gyp change to add
SK_SIMPLE_TWOCOLOR_VERTICAL_GRADIENTS, this reduces the rebaselining from
r3073 from ~200 to ~20.
codereview.appspot.com/5558055/
git-svn-id: http://skia.googlecode.com/svn/trunk@3077 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-20 13:59:14 +00:00
senorblanco@chromium.org
7288c49cf2
Fix a warning in libtess in Release builds; define NDEBUG in Release on all
...
platforms.
BUG: http://code.google.com/p/skia/issues/detail?id=456
Review URL: http://codereview.appspot.com/5555054/
git-svn-id: http://skia.googlecode.com/svn/trunk@3076 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-19 19:59:22 +00:00
bsalomon@google.com
4f3c253ece
Add flag to disable gl error checking when allocating gpu objects
...
Review URL: http://codereview.appspot.com/5558052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3075 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-19 16:16:52 +00:00
schenney@chromium.org
fde6b414d9
Cleanup of SkPath code to remove SK_OLD_EMPTY_PATH_BEHAVIOR and other
...
dead code. The patch also renames kAfterClose_SegmentState for the
SkPath::Iter class, to kEmptyContour_SegmentState which more
accurately reflects the meaning of the state. The Iter can be in that
state initially, before anything has been seen, let alone a close.
BUG=445
TEST=Covered by existing tests.
Review URL: https://codereview.appspot.com/5532091
git-svn-id: http://skia.googlecode.com/svn/trunk@3074 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-19 15:31:01 +00:00
reed@google.com
d028d945da
rebaseline with fix to drawAsAHairline
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3073 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-19 14:23:24 +00:00
tomhudson@google.com
13e812c69a
Interpolate vertical linear gradients for improved quality.
...
Consolidate interpolation functions, add new faster more accurate dithering
interpolator.
git-svn-id: http://skia.googlecode.com/svn/trunk@3072 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 21:28:01 +00:00
bsalomon@google.com
90503184f6
Rebaseline hairmodes GM at r3070
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3071 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 21:00:54 +00:00
bsalomon@google.com
dd1be60702
Pull xfer mode test out of generic draw-as-hairline test. Use coverage rather than alpha to draw hairlines < 1pix wide in GPU.
...
Review URL: http://codereview.appspot.com/5528112/
git-svn-id: http://skia.googlecode.com/svn/trunk@3070 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 20:34:00 +00:00
epoger@google.com
376cd1f919
Fix mimetypes for all checked-in GM baselines (no image content changes)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 20:29:56 +00:00
epoger@google.com
e3cc2eb88f
Stop writing out XPS baselines until we resolve skia issue 455
...
BUG=455
TBR=bungeman
Review URL: https://codereview.appspot.com/5554052
git-svn-id: http://skia.googlecode.com/svn/trunk@3068 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 20:11:13 +00:00
bsalomon@google.com
46f7afb986
Turn clipping back on in OSAA pass 1. Skip default cons on GrDrawState when saving off a GrDrawTarget's state.
...
Review URL: http://codereview.appspot.com/5553051/
git-svn-id: http://skia.googlecode.com/svn/trunk@3067 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 19:51:55 +00:00
epoger@google.com
b90113dd3d
Remove apparent SkIntToScalar(SkScalar) call in SkScalerContext_FreeType
...
This change seems to fix the following assertion failure we have been seeing
in the Skia_Linux_Fixed_Debug build since http://code.google.com/p/skia/source/detail?r=3059 :
drawing... bitmapfilters [540 330]
../include/core/SkFixed.h:67: failed assertion "n >= -32768 && n <= 32767"
Review URL: https://codereview.appspot.com/5557049
git-svn-id: http://skia.googlecode.com/svn/trunk@3066 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 19:20:39 +00:00
junov@google.com
77e498e6ba
Updating gm's usage message
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3065 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 18:56:34 +00:00
schenney@chromium.org
f4b07328df
Somehow this change was missing from the previous commit.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3063 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 18:06:10 +00:00
schenney@chromium.org
a6d04d90e2
Fixing the behavior of SkPathMeasure to reflect changes in SkPath::Iter.
...
This implementation modifies SkPath::Iter extensively to avoid copying
the points when used to measure path length.
BUG=446
TEST=tests/PathMeasureTest.cpp
Review URL: https://codereview.appspot.com/5533074
git-svn-id: http://skia.googlecode.com/svn/trunk@3062 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 18:02:10 +00:00
reed@google.com
8351aabbfe
add GenA8FromLCD as a hack to force GDI to create the A8 mask from the LCD
...
results, rather than asking GDI directly for A8 (which it sometimes decides
to interpret as BW)
git-svn-id: http://skia.googlecode.com/svn/trunk@3061 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 17:06:35 +00:00
epoger@google.com
2c1eb6f08d
Landing change from http://codereview.appspot.com/5540063/
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3060 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 17:02:15 +00:00
junov@google.com
4370aedf7f
Adding class SkDeferredCanvas for deferred rendering.
...
TEST=added a new pass to gm, so all gm tests are run through SkDeferredCanvas
REVIEW=http://codereview.appspot.com/5430058/
git-svn-id: http://skia.googlecode.com/svn/trunk@3059 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-18 16:21:08 +00:00
epoger@google.com
20ad5ac8f6
Change download-baselines script to download images from skia-autogen SVN repo
...
I have copied the old version (which downloads the images from the buildbots
directly, but only works with our Mac buildbots) to download-baselines-old,
so we can use either version during a transition period.
Another difference: the new version sets the mimetype property of all image
files in the baseline_subdir, even those that have not changed.
BUG=386
http://code.google.com/p/skia/issues/detail?id=386 ('make buildbots write out RunGM image results to a browsable directory')
Review URL: https://codereview.appspot.com/5544056
git-svn-id: http://skia.googlecode.com/svn/trunk@3058 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 21:26:05 +00:00
bsalomon@google.com
2401ae8fd3
Attempt to reland 3054
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3056 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 21:03:05 +00:00
bsalomon@google.com
8b39f8f2bc
Revert r3054 for failing tests
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3055 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 20:14:58 +00:00
bsalomon@google.com
e6bea08a5c
Add constant coverage to GrDrawState
...
Review URL: http://codereview.appspot.com/5543052/
git-svn-id: http://skia.googlecode.com/svn/trunk@3054 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 19:58:34 +00:00
epoger@google.com
4036f07001
whitespace change to trigger Skia buildbot
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3053 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 19:20:02 +00:00
reed@google.com
188bfcf766
if the y-max has neighbors (prev and next) with the same Y values, then the
...
cross will be 0, but we can still know the direction by looking at the change
in X
Fixes the hypen in #7 of this bug http://code.google.com/p/chromium/issues/detail?id=109370
git-svn-id: http://skia.googlecode.com/svn/trunk@3049 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 18:26:38 +00:00
reed@google.com
0e06f92bf6
rebaseline following change to subpixel positioning
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3048 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 18:23:36 +00:00
epoger@google.com
8d0bc52330
whitespace change to tri
...
gger Skia buildbot
git-svn-id: http://skia.googlecode.com/svn/trunk@3047 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 17:23:22 +00:00
bsalomon@google.com
5cc90d1322
Incorporate changes related to Tom's post-hoc comments on the convex path renderer.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3045 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 16:28:34 +00:00
bsalomon@google.com
90d344adc2
fix assert
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3044 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 16:16:49 +00:00
bsalomon@google.com
52a5dcb43b
Add GrDrawState reset
...
Review URL: http://codereview.appspot.com/5543059/
git-svn-id: http://skia.googlecode.com/svn/trunk@3043 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 16:01:37 +00:00
bsalomon@google.com
5e9bf82814
second try to fix assert
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3042 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 14:39:21 +00:00
bsalomon@google.com
5ce2796854
Change static asserts of scalar type to runtime asserts (re r3040)
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3041 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 14:31:23 +00:00
bsalomon@google.com
69cc6ad20e
Add convex path renderer (disabled)
...
Review URL: http://codereview.appspot.com/5533061/
git-svn-id: http://skia.googlecode.com/svn/trunk@3040 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-17 14:25:10 +00:00
skyostil@google.com
0eb7576c65
Modify SkBitmap::extractSubset() to respect volatility
...
The resulting subset bitmap will always have the same volatility flag as the
source bitmap.
BUG=452
Review URL: http://codereview.appspot.com/5544052
git-svn-id: http://skia.googlecode.com/svn/trunk@3039 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-16 10:45:53 +00:00
bungeman@google.com
ff25e3e3a0
Rebaseline for 3037.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3038 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-13 16:07:11 +00:00
bungeman@google.com
2211b62327
Subpixel text 3/8 of a pixel too far to the right.
...
http://codereview.appspot.com/5502097/
git-svn-id: http://skia.googlecode.com/svn/trunk@3037 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-13 15:02:58 +00:00
skyostil@google.com
ce7adb580e
Modify SkBitmap::extractSubset() to respect opaqueness
...
The resulting subset bitmap will always have the same opaqueness flag as the
source bitmap.
BUG=439
Review URL: http://codereview.appspot.com/5534051
git-svn-id: http://skia.googlecode.com/svn/trunk@3036 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-13 14:56:51 +00:00
bsalomon@google.com
9f169a4b01
Add gyp variable to disable OSAA
...
Review URL: http://codereview.appspot.com/5539047
git-svn-id: http://skia.googlecode.com/svn/trunk@3033 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-12 20:56:52 +00:00
bsalomon@google.com
5db3b6cce4
Fix vs2010 int to scalar warnings
...
git-svn-id: http://skia.googlecode.com/svn/trunk@3032 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-01-12 20:38:57 +00:00