aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
* if SK_USE_COLOR_LUMINANCE is defined, then we store 2 bits of each componentGravatar reed@google.com2012-02-13
| | | | | | | | | to create a per-component-luminance value for the fonthost to use. Only supported on Mac at the moment (but still disabled by default) git-svn-id: http://skia.googlecode.com/svn/trunk@3180 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable color-luminance in font cache (disabled by default)Gravatar reed@google.com2012-02-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3168 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing backing store access in SkDeferredCanvas.Gravatar junov@chromium.org2012-02-07
| | | | | | | | | | | | Chromium CL required for rolling skia DEPS past this change is posted here: https://chromiumcodereview.appspot.com/9341003/ BUG=http://code.google.com/p/skia/issues/detail?id=475 REVIEW=http://codereview.appspot.com/5626047/ TEST=DeferredCanvas unit test git-svn-id: http://skia.googlecode.com/svn/trunk@3147 2bbb7eff-a529-9590-31e7-b0007b416f81
* use macro SkFixedRoundToInt where necessaryGravatar reed@google.com2012-02-06
| | | | | | | | http://codereview.appspot.com/5617047/ git-svn-id: http://skia.googlecode.com/svn/trunk@3142 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't change convexity status of a path after a moveToGravatar bsalomon@google.com2012-02-02
| | | | | | | Review URL: http://codereview.appspot.com/5581048/ git-svn-id: http://skia.googlecode.com/svn/trunk@3127 2bbb7eff-a529-9590-31e7-b0007b416f81
* When adding a convex shape to a path, mark path as convex if path is ↵Gravatar bsalomon@google.com2012-01-31
| | | | | | | | | | initially degenerate. Review URL: http://codereview.appspot.com/5504073/ git-svn-id: http://skia.googlecode.com/svn/trunk@3124 2bbb7eff-a529-9590-31e7-b0007b416f81
* fall through to cross-product if the y-max-baseline returns a degenerate lineGravatar reed@google.com2012-01-31
| | | | | | | | (i.e. maxIndex == minIndex) git-svn-id: http://skia.googlecode.com/svn/trunk@3119 2bbb7eff-a529-9590-31e7-b0007b416f81
* handle multiple points all at the y-max when computing directionGravatar reed@google.com2012-01-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3116 2bbb7eff-a529-9590-31e7-b0007b416f81
* use contour with global ymax to determine directionGravatar reed@google.com2012-01-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3110 2bbb7eff-a529-9590-31e7-b0007b416f81
* add bandage to pin out-of-range values when converting our integral clip ↵Gravatar reed@google.com2012-01-30
| | | | | | | | | | | bounds to a SkRect (when SkScalar==fixed). Eliminates a (valid) assert, but does not really return the "correct" value (which can't be represented in SkRect). git-svn-id: http://skia.googlecode.com/svn/trunk@3105 2bbb7eff-a529-9590-31e7-b0007b416f81
* inject a 32767 bounded cliprect before using SuperSampler blitter, to avoidGravatar reed@google.com2012-01-30
| | | | | | | | | | crash/assert when our run-array is larger than int16_t. Better fix may be to "tile" the drawing, so we never see a clip that's too wide, and perhaps this technique can help us avoid disabling AA for large parths (not sure tho). git-svn-id: http://skia.googlecode.com/svn/trunk@3104 2bbb7eff-a529-9590-31e7-b0007b416f81
* extend fastbounds impls to include maskfilters and drawloopers. This allowsGravatar reed@google.com2012-01-30
| | | | | | | | | | us to perform quick-rejects when drawing objects with shadows (esp. text). WebKit draws shadows w/ a looper (fg and shadow) and a maskfilter on the shadow layer. git-svn-id: http://skia.googlecode.com/svn/trunk@3103 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding a flush method to SkCanvasGravatar junov@chromium.org2012-01-30
| | | | | | | | | | BUG=http://code.google.com/p/skia/issues/detail?id=467 REVIEW=http://codereview.appspot.com/5600044/ TEST=gm uses the new code path on all its test cases git-svn-id: http://skia.googlecode.com/svn/trunk@3102 2bbb7eff-a529-9590-31e7-b0007b416f81
* Formatting cleanup: remove extra whitespaceGravatar vandebo@chromium.org2012-01-28
| | | | | | | | Change by arthurhsu@chromium.org, original CL: http://codereview.appspot.com/5587049/ Review URL: https://codereview.appspot.com/5594043 git-svn-id: http://skia.googlecode.com/svn/trunk@3098 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* 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
* disable SPEW_PURGE_STATUSGravatar reed@google.com2012-01-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3085 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* automatically inject a moveTo if we see a close followed by a line/quad/cubicGravatar reed@google.com2012-01-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3027 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable direction test, fix handling of degenerate segments in the ↵Gravatar reed@google.com2012-01-11
| | | | | | non-convex case git-svn-id: http://skia.googlecode.com/svn/trunk@3021 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix cheapComputeDirection() in the non-convex case to pivot on the y-max pointGravatar reed@google.com2012-01-11
| | | | | | | | | rather than pivoting on the next. Also remove the loop, as it is just logically wrong to think we can use this trick only a non-extrema pt. git-svn-id: http://skia.googlecode.com/svn/trunk@3014 2bbb7eff-a529-9590-31e7-b0007b416f81
* improve clamping logic when handling imprecise chopping of cubicsGravatar reed@google.com2012-01-11
| | | | | | | | http://code.google.com/p/skia/issues/detail?id=444 git-svn-id: http://skia.googlecode.com/svn/trunk@3011 2bbb7eff-a529-9590-31e7-b0007b416f81
* stroking wants CW, so we reverse if the orig was CCWGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3004 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore (debugged) cheapComputeDirectionGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3000 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable cheap check while its being debuggedGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2998 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::cheapComputeDirection() plus unittestsGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2996 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::reverseAddPath()Gravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2995 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add ARM optimizations to the build.Gravatar djsollen@google.com2012-01-09
| | | | | | | | Also had to fix a problem in the ARM memset code that was causing some tests and bench to fail. Review URL: http://codereview.appspot.com/5522052 git-svn-id: http://skia.googlecode.com/svn/trunk@2989 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove obsolete fileGravatar reed@google.com2012-01-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2986 2bbb7eff-a529-9590-31e7-b0007b416f81
* add allowImageFilter() so a device can allow/disallow filtersGravatar reed@google.com2012-01-06
| | | | | | | | (esp. for printing) git-svn-id: http://skia.googlecode.com/svn/trunk@2981 2bbb7eff-a529-9590-31e7-b0007b416f81
* add filterImage() entry-point to SkDevice, to allow it to specialize on ↵Gravatar reed@google.com2012-01-05
| | | | | | | | | | subclasses of SkImageFilter. If that returns false, then the filter itself is invoked. git-svn-id: http://skia.googlecode.com/svn/trunk@2977 2bbb7eff-a529-9590-31e7-b0007b416f81
* add asComponentTable() query (will impl in SkTableColorFilter next)Gravatar reed@google.com2012-01-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2971 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the ability to iterate through a path without modification. This change isGravatar schenney@chromium.org2012-01-04
| | | | | | | | | | required by WebKit SVG in order to correctly draw markers and endcaps. BUG=415 TEST=TestPath in the unit tests Review URL: http://codereview.appspot.com/5505097 git-svn-id: http://skia.googlecode.com/svn/trunk@2962 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow 0 as a valid text size in SkPaint.Gravatar djsollen@google.com2012-01-04
| | | | | | Review URL: http://codereview.appspot.com/5514043 git-svn-id: http://skia.googlecode.com/svn/trunk@2961 2bbb7eff-a529-9590-31e7-b0007b416f81
* drawPosText with center or right align skips every other character.Gravatar bungeman@google.com2012-01-04
| | | | | | | http://codereview.appspot.com/5504118/ git-svn-id: http://skia.googlecode.com/svn/trunk@2959 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix off-by-one error in assertion; improve coverage_to_exact_alpha()Gravatar tomhudson@google.com2012-01-03
| | | | | | | | | | implementation. http://codereview.appspot.com/5504116/ git-svn-id: http://skia.googlecode.com/svn/trunk@2947 2bbb7eff-a529-9590-31e7-b0007b416f81
* expose isSubpixel() on the cache, so SkDraw can know if it should expectGravatar reed@google.com2012-01-03
| | | | | | | | subpixel text (it may be that the paint requested it, but the scaler ignored it) git-svn-id: http://skia.googlecode.com/svn/trunk@2946 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update header comments to more accurately describe behavior ofGravatar tomhudson@google.com2012-01-03
| | | | | | | | | | SkRegion::getBoundaryPath(). Add SkASSERT of SkPath argument for safety. codereview.appspot.com/5504095/ git-svn-id: http://skia.googlecode.com/svn/trunk@2942 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix problems with SampleApp Fuzzer due to issues in iterating over ↵Gravatar schenney@chromium.org2011-12-29
| | | | | | | | | | | | | | degenerate paths. The fuzzer gets my vote as best test tool ever. There are several issues outstanding: crashes in FixedPoint and a crash in the path filling code that is most likely due to clipping problems (but maybe not). BUG=425 Review URL: http://codereview.appspot.com/5503080 git-svn-id: http://skia.googlecode.com/svn/trunk@2936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tighten up restrictions on blit width: some shaders assert that theyGravatar tomhudson@google.com2011-12-29
| | | | | | | | | are addressing more than 0 pixels. codereview.appspot.com/5489125/ git-svn-id: http://skia.googlecode.com/svn/trunk@2935 2bbb7eff-a529-9590-31e7-b0007b416f81
* Bugfixes to antialiased blitting.Gravatar tomhudson@google.com2011-12-28
| | | | | | | | | More details of blitter contracts in function headers. New precautionary assert in one high-level default blitter. git-svn-id: http://skia.googlecode.com/svn/trunk@2928 2bbb7eff-a529-9590-31e7-b0007b416f81