aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* posix: Avoid static initializers in static/global mutexesGravatar digit@google.com2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change background color and add paths to convexpaths gmGravatar bsalomon@google.com2012-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3090 2bbb7eff-a529-9590-31e7-b0007b416f81
* need to include SkColorFilter.h since we reference some methods on itGravatar reed@google.com2012-01-26
| | | | | | | | in our inline functions. git-svn-id: http://skia.googlecode.com/svn/trunk@3089 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkRegion::operator== a member function, rather than a privately-declaredGravatar reed@google.com2012-01-25
| | | | | | | | | | | 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
* Intersection work in progressGravatar caryclark@google.com2012-01-25
| | | | | | Review URL: https://codereview.appspot.com/5576043 git-svn-id: http://skia.googlecode.com/svn/trunk@3087 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix vertical bold text on macGravatar caryclark@google.com2012-01-25
| | | | | | | | M src/ports/SkFontHost_mac_coretext.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@3086 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable SPEW_PURGE_STATUSGravatar reed@google.com2012-01-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3085 2bbb7eff-a529-9590-31e7-b0007b416f81
* whitespace change to trigger Skia buildbotGravatar epoger@google.com2012-01-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3082 2bbb7eff-a529-9590-31e7-b0007b416f81
* Prefer a texture pixel ref to a render target pixel ref when creating an ↵Gravatar bsalomon@google.com2012-01-24
| | | | | | | | | | SkGpuDevice Review URL: http://codereview.appspot.com/5570050/ git-svn-id: http://skia.googlecode.com/svn/trunk@3081 2bbb7eff-a529-9590-31e7-b0007b416f81
* Whitespace commit to check if lion / win bots are hosed.Gravatar bsalomon@google.com2012-01-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3080 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 3078Gravatar bsalomon@google.com2012-01-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3079 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix interior issues in convex path rendererGravatar bsalomon@google.com2012-01-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3078 2bbb7eff-a529-9590-31e7-b0007b416f81
* Temporarily allow linear interpolation of 2-color vertical gradients to beGravatar tomhudson@google.com2012-01-20
| | | | | | | | | | | | 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
* Fix a warning in libtess in Release builds; define NDEBUG in Release on allGravatar senorblanco@chromium.org2012-01-19
| | | | | | | | | | | 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
* Add flag to disable gl error checking when allocating gpu objectsGravatar bsalomon@google.com2012-01-19
| | | | | | | | Review URL: http://codereview.appspot.com/5558052/ git-svn-id: http://skia.googlecode.com/svn/trunk@3075 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup of SkPath code to remove SK_OLD_EMPTY_PATH_BEHAVIOR and otherGravatar schenney@chromium.org2012-01-19
| | | | | | | | | | | | | | 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
* rebaseline with fix to drawAsAHairlineGravatar reed@google.com2012-01-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3073 2bbb7eff-a529-9590-31e7-b0007b416f81
* Interpolate vertical linear gradients for improved quality.Gravatar tomhudson@google.com2012-01-18
| | | | | | | | | 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
* Rebaseline hairmodes GM at r3070Gravatar bsalomon@google.com2012-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3071 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pull xfer mode test out of generic draw-as-hairline test. Use coverage ↵Gravatar bsalomon@google.com2012-01-18
| | | | | | | | | | | 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
* Fix mimetypes for all checked-in GM baselines (no image content changes)Gravatar epoger@google.com2012-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3069 2bbb7eff-a529-9590-31e7-b0007b416f81
* Stop writing out XPS baselines until we resolve skia issue 455Gravatar epoger@google.com2012-01-18
| | | | | | | | 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
* Turn clipping back on in OSAA pass 1. Skip default cons on GrDrawState when ↵Gravatar bsalomon@google.com2012-01-18
| | | | | | | | | | 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
* Remove apparent SkIntToScalar(SkScalar) call in SkScalerContext_FreeTypeGravatar epoger@google.com2012-01-18
| | | | | | | | | | | 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
* Updating gm's usage messageGravatar junov@google.com2012-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3065 2bbb7eff-a529-9590-31e7-b0007b416f81
* Somehow this change was missing from the previous commit.Gravatar schenney@chromium.org2012-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3063 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing the behavior of SkPathMeasure to reflect changes in SkPath::Iter.Gravatar schenney@chromium.org2012-01-18
| | | | | | | | | | | 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
* add GenA8FromLCD as a hack to force GDI to create the A8 mask from the LCDGravatar reed@google.com2012-01-18
| | | | | | | | | 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
* Landing change from http://codereview.appspot.com/5540063/Gravatar epoger@google.com2012-01-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding class SkDeferredCanvas for deferred rendering.Gravatar junov@google.com2012-01-18
| | | | | | | | | 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
* Change download-baselines script to download images from skia-autogen SVN repoGravatar epoger@google.com2012-01-17
| | | | | | | | | | | | | | | 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
* Attempt to reland 3054Gravatar bsalomon@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3056 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r3054 for failing testsGravatar bsalomon@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add constant coverage to GrDrawStateGravatar bsalomon@google.com2012-01-17
| | | | | | | | Review URL: http://codereview.appspot.com/5543052/ git-svn-id: http://skia.googlecode.com/svn/trunk@3054 2bbb7eff-a529-9590-31e7-b0007b416f81
* whitespace change to trigger Skia buildbotGravatar epoger@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3053 2bbb7eff-a529-9590-31e7-b0007b416f81
* if the y-max has neighbors (prev and next) with the same Y values, then theGravatar reed@google.com2012-01-17
| | | | | | | | | | | 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
* rebaseline following change to subpixel positioningGravatar reed@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3048 2bbb7eff-a529-9590-31e7-b0007b416f81
* whitespace change to triGravatar epoger@google.com2012-01-17
| | | | | | gger Skia buildbot git-svn-id: http://skia.googlecode.com/svn/trunk@3047 2bbb7eff-a529-9590-31e7-b0007b416f81
* Incorporate changes related to Tom's post-hoc comments on the convex path ↵Gravatar bsalomon@google.com2012-01-17
| | | | | | renderer. git-svn-id: http://skia.googlecode.com/svn/trunk@3045 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix assertGravatar bsalomon@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3044 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GrDrawState resetGravatar bsalomon@google.com2012-01-17
| | | | | | | | | Review URL: http://codereview.appspot.com/5543059/ git-svn-id: http://skia.googlecode.com/svn/trunk@3043 2bbb7eff-a529-9590-31e7-b0007b416f81
* second try to fix assertGravatar bsalomon@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3042 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change static asserts of scalar type to runtime asserts (re r3040)Gravatar bsalomon@google.com2012-01-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3041 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add convex path renderer (disabled)Gravatar bsalomon@google.com2012-01-17
| | | | | | | | Review URL: http://codereview.appspot.com/5533061/ git-svn-id: http://skia.googlecode.com/svn/trunk@3040 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modify SkBitmap::extractSubset() to respect volatilityGravatar skyostil@google.com2012-01-16
| | | | | | | | | | 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
* Rebaseline for 3037.Gravatar bungeman@google.com2012-01-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3038 2bbb7eff-a529-9590-31e7-b0007b416f81
* Subpixel text 3/8 of a pixel too far to the right.Gravatar bungeman@google.com2012-01-13
| | | | | | | http://codereview.appspot.com/5502097/ git-svn-id: http://skia.googlecode.com/svn/trunk@3037 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modify SkBitmap::extractSubset() to respect opaquenessGravatar skyostil@google.com2012-01-13
| | | | | | | | | | 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
* Add gyp variable to disable OSAAGravatar bsalomon@google.com2012-01-12
| | | | | | | | Review URL: http://codereview.appspot.com/5539047 git-svn-id: http://skia.googlecode.com/svn/trunk@3033 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix vs2010 int to scalar warningsGravatar bsalomon@google.com2012-01-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3032 2bbb7eff-a529-9590-31e7-b0007b416f81