aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScan_Antihair.cpp
Commit message (Collapse)AuthorAge
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* ubsan shift fixesGravatar caryclark2015-12-09
| | | | | | | | | | | Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned. Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros. R=reed@google.com,mtklein@google.com BUG=skia:4633 Review URL: https://codereview.chromium.org/1503423003
* SkScan_Antihair: assert in debug and potentialy lost last pixelsGravatar aleksandar.stojiljkovic2015-11-02
| | | | | | | | | alpha: (uint8_t) 256 is clamped to 255 before static cast to uint8_t in SkToU8. BUG=4406 Review URL: https://codereview.chromium.org/1424253002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* The compiler can generate smulbb perfectly well nowadays.Gravatar mtklein2015-08-07
| | | | | | BUG=skia:4117 Review URL: https://codereview.chromium.org/1273203002
* add blitter api for aa-hairlinesGravatar reed2015-04-15
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1088143002
* Revert of add new blit2 methods in support of antialiased hairlines guard ↵Gravatar jcgregorio2015-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flag SK_SUPPORT_LEGACY_BLITANTIH2V2 (patchset #2 id:20001 of https://codereview.chromium.org/1060153003/) Reason for revert: DEPS roll is failing, one such example: http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/73847/steps/ash_unittests%20%28with%20patch%29/logs/stdio More here: https://codereview.chromium.org/1091483003 This CL was the only CL in the roll when things started to fail. Original issue's description: > add new blit2 methods in support of antialiased hairlines > > before: > 9M 1 528µs 530µs 539µs 607µs 5% ▁▁▁▁▁▁▁▁█▂ 8888 path_hairline_small_AA_quad > > after: > 9M 1 355µs 356µs 358µs 375µs 2% ▂▁▁▁▁▁▁▁▁█ 8888 path_hairline_small_AA_quad > > BUG=skia: > > does require new baselines (bug chrome is guarded) > > Committed: https://skia.googlesource.com/skia/+/dd83031b98db4c6d3d0de2353bf115152a7d1464 TBR=caryclark@google.com,reed@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1085013003
* add new blit2 methods in support of antialiased hairlinesGravatar reed2015-04-14
| | | | | | | | | | | | | | before: 9M 1 528µs 530µs 539µs 607µs 5% ▁▁▁▁▁▁▁▁█▂ 8888 path_hairline_small_AA_quad after: 9M 1 355µs 356µs 358µs 375µs 2% ▂▁▁▁▁▁▁▁▁█ 8888 path_hairline_small_AA_quad BUG=skia: does require new baselines (bug chrome is guarded) Review URL: https://codereview.chromium.org/1060153003
* change hairline procs to take array of pointsGravatar reed2015-04-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1085883002
* change hairline procs to take SkPoint by value, more efficient on SSE and NEONGravatar reed2015-04-10
| | | | | | | | | precursor for https://codereview.chromium.org/1074313002/ BUG=skia: TBR= Review URL: https://codereview.chromium.org/1084433002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* some utils for rect and matrixGravatar reed2015-03-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1003813003
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Fix thin rect stroking.Gravatar fmalita2015-01-05
| | | | | | | | | | | When both edges of a thin (sub-unit) stroke fall within the same pixel, we compute the wrong coverage and also blit the same line twice. To avoid these issues, tweak the inner/outer hulls to ensure one of the edges is always pixel-aligned. BUG=skia:3278 R=reed@google.com Review URL: https://codereview.chromium.org/819253003
* add roundOut that returns its resultGravatar reed2014-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/742663002
* SK_SUPPORTED_DEPRECATED_FIXEDROUND around deprecated fixed[round,ceil,floor]Gravatar mike@reedtribe.org2014-01-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12903 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warning from scalar --> int32 conversionGravatar humper@google.com2013-01-07
| | | | | | | | BUG= Review URL: https://codereview.appspot.com/7065050 git-svn-id: http://skia.googlecode.com/svn/trunk@7061 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix Android compiler warnings.Gravatar djsollen@google.com2013-01-04
| | | | | | Review URL: https://codereview.appspot.com/7040053 git-svn-id: http://skia.googlecode.com/svn/trunk@7014 2bbb7eff-a529-9590-31e7-b0007b416f81
* catch case where clipping shortened the line down to a single pixel, but ourGravatar reed@google.com2012-10-31
| | | | | | | | | | | state variables made us draw twice... with different fractional positions (yikes). Inspired by http://code.google.com/p/chromium/issues/detail?id=148638 tho not necessarily a fix for that issue (can't repro the issue yet). git-svn-id: http://skia.googlecode.com/svn/trunk@6220 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-10-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6133 2bbb7eff-a529-9590-31e7-b0007b416f81
* use subclasses instead of function-ptrs for hairline specializations.Gravatar reed@google.com2012-10-25
| | | | | | | | | 1. enables easy grouping of procs, e.g. cap -vs- line 2. easy to extend for more shared state (e.g. gamma table, etc.) git-svn-id: http://skia.googlecode.com/svn/trunk@6119 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* chop hairlines against 32K bounds, since that is our limit (currently)Gravatar reed@google.com2012-04-17
| | | | | | | | for a fixedpoint implementation. git-svn-id: http://skia.googlecode.com/svn/trunk@3713 2bbb7eff-a529-9590-31e7-b0007b416f81
* need to invert the alpha computation for single scanline on innerfillGravatar reed@google.com2012-04-16
| | | | | | | | found by Fuzzer git-svn-id: http://skia.googlecode.com/svn/trunk@3694 2bbb7eff-a529-9590-31e7-b0007b416f81
* rm obsolete build-flag SK_IGNORE_HAIRLINE_CLIP_FIXGravatar reed@google.com2012-03-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3567 2bbb7eff-a529-9590-31e7-b0007b416f81
* check for integer-nan (0x8000...) and don't draw those as antihairlinesGravatar reed@google.com2012-03-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3558 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't clamp the stopScale to 0 unless it originally exceeded the clip. This isGravatar reed@google.com2012-03-15
| | | | | | | | | a tweak on the fix in 3366, but in that earlier change, I mistakenly changed > to >=. This CL just restores the compare to > git-svn-id: http://skia.googlecode.com/svn/trunk@3400 2bbb7eff-a529-9590-31e7-b0007b416f81
* add build option to revert hairline-clipping fix from 3366Gravatar reed@google.com2012-03-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3376 2bbb7eff-a529-9590-31e7-b0007b416f81
* if we are extending past our clip in antihairlines, don't draw that lastGravatar reed@google.com2012-03-12
| | | | | | | | | row/col (setting its scale to 0), so we don't violate the clip-rule and possibly double-draw the last pixel. git-svn-id: http://skia.googlecode.com/svn/trunk@3366 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix scalar=fixed by implementing SkRegion form of AntiFillRectGravatar reed@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2516 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable soft clipping (yikes)Gravatar reed@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* get tests closer to passing for SKIA_SCALAR=fixedGravatar epoger@google.com2011-05-17
| | | | | | | | http://codereview.appspot.com/4532064/ git-svn-id: http://skia.googlecode.com/svn/trunk@1351 2bbb7eff-a529-9590-31e7-b0007b416f81
* correctly compute coverage when an antialiased rect covers only 1 column of ↵Gravatar reed@google.com2011-05-05
| | | | | | pixels git-svn-id: http://skia.googlecode.com/svn/trunk@1256 2bbb7eff-a529-9590-31e7-b0007b416f81
* coding style updatesGravatar mike@reedtribe.org2011-04-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1090 2bbb7eff-a529-9590-31e7-b0007b416f81
* round the alphamul so we don't overflow a byteGravatar reed@google.com2011-04-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1071 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable fast stroked rects, now that we correctly handle non-square scaleGravatar reed@google.com2011-04-04
| | | | | | | | also, degenerate non-antialias rectangles now draw properly git-svn-id: http://skia.googlecode.com/svn/trunk@1049 2bbb7eff-a529-9590-31e7-b0007b416f81
* faster stroke rectsGravatar mike@reedtribe.org2011-04-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1042 2bbb7eff-a529-9590-31e7-b0007b416f81
* add unittest for IntersectLine, used by hairlinesGravatar reed@android.com2009-11-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@447 2bbb7eff-a529-9590-31e7-b0007b416f81
* retool clipping in hairlines to catch huge coordinatesGravatar reed@android.com2009-11-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@436 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix gaps in antialiased hairlines (thanks to preda)Gravatar reed@android.com2009-08-28
| | | | | | | | expand SampleHairline text to check for clip violations git-svn-id: http://skia.googlecode.com/svn/trunk@340 2bbb7eff-a529-9590-31e7-b0007b416f81
* use static_castGravatar reed@android.com2009-03-23
| | | | | | | | fix comments git-svn-id: http://skia.googlecode.com/svn/trunk@135 2bbb7eff-a529-9590-31e7-b0007b416f81
* add check/hack to avoid drawing outside of the clip for hairlinesGravatar reed@android.com2009-03-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@134 2bbb7eff-a529-9590-31e7-b0007b416f81
* add sanity checks to handles extremely large coordinates or filter margins.Gravatar reed@android.com2009-03-16
| | | | | | | | | Should not hurt features (we hope), but is an easy way to survive malicious values on a small-memory machine like a handset. git-svn-id: http://skia.googlecode.com/svn/trunk@123 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81