aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMask.cpp
Commit message (Collapse)AuthorAge
* Fix some shadow issues.Gravatar Jim Van Verth2018-06-26
| | | | | | | | | | | | | | | | * Clamp path polygon points to nearest 1/16th of a pixel to help with floating point issues. * Added check for multiple contour paths. * Return empty SkVertices for certain degenerate cases to avoid unnecessary blurs. * Check iteration count in SkOffsetPolygon to avoid infinite loops. * Add new tests to verify these. Bug: skia: Change-Id: Ie6ad48d2504e065dcc822609d369f90c56ef3ad3 Reviewed-on: https://skia-review.googlesource.com/136701 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Remove sk_64_isS32 and sk_64_asS32Gravatar Herb Derby2018-05-21
| | | | | | | | | This is an API change. I assume that only Skia uses these routines. Change-Id: Iefc98fa5c0b83eb4f52c478e345fd99121ecb254 Reviewed-on: https://skia-review.googlesource.com/129440 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Use MaskFilter to create SDFs for text.Gravatar Jim Van Verth2018-05-04
| | | | | | | | | | Easy way to store SDFs in the glyph cache. Change-Id: Ia67e5c8619862bdee6aa3b293e30507d029e3bf1 Bug: skia: Reviewed-on: https://skia-review.googlesource.com/123748 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Centralize mask byte calculations"Gravatar Herb Derby2018-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8994150a436f0e813e9a7b8a2dc0ad237f4e3513. Reason for revert: Breaks mask rowbytes calc. Original change's description: > Centralize mask byte calculations > > These calculations are usually done in place around the code, > but most implementation don't take the care needed for safe calculation. > > I have provided safe implementations for use around the code. It > will take a while to track down all the independant implementations > and convert them over. > > BUG=skia:7515 > > Change-Id: Ice6a9be2e8e5ebef18d472adb26c17b03177ef47 > Reviewed-on: https://skia-review.googlesource.com/111120 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=herb@google.com,reed@google.com Change-Id: I2ce6c5e647fb684c6472022517ad777d29c8177c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/112640 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Centralize mask byte calculationsGravatar Herb Derby2018-03-06
| | | | | | | | | | | | | | | | These calculations are usually done in place around the code, but most implementation don't take the care needed for safe calculation. I have provided safe implementations for use around the code. It will take a while to track down all the independant implementations and convert them over. BUG=skia:7515 Change-Id: Ice6a9be2e8e5ebef18d472adb26c17b03177ef47 Reviewed-on: https://skia-review.googlesource.com/111120 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* move zero-init to sk_malloc for masksGravatar Mike Reed2018-01-22
| | | | | | | | Bug: skia: Change-Id: I75d557068bdcd9e9f7e380e4fa447f9d83dd1554 Reviewed-on: https://skia-review.googlesource.com/98200 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove unsafe align4 callGravatar Herb Derby2017-09-21
| | | | | | | | | | | Align by 4 safely before calling malloc. BUG=chromium:763972 Change-Id: I9278ae0df516adf3eb96fc390ad7318a47cbefa4 Reviewed-on: https://skia-review.googlesource.com/49760 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Change SkMemory to the more accurately named SkMalloc.Gravatar Herb Derby2017-03-27
| | | | | | | Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make SkMemory.h and adjust all files for usage.Gravatar Herb Derby2017-03-20
| | | | | | | | | | | | This will be rolled out in three stages: 1) make SkMemory.h and have SkTypes.h include it. 2) Adjust chromium and android. 3) no long include SkMemory.h in SkTypes.h Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d Reviewed-on: https://skia-review.googlesource.com/9874 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* return reference to cache instead of copying the maskGravatar reed2015-02-04
| | | | | | BUG=437128 Review URL: https://codereview.chromium.org/889303005
* remove unused kLCD_MaskFormatGravatar reed2014-11-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/728673002
* fix (some) 64bit warnings -- size_t -> intGravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | BUG=skia: R=mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/147053003 git-svn-id: http://skia.googlecode.com/svn/trunk@13178 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove remaining references to Sk64 (obsolete)Gravatar reed@google.com2014-01-13
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/136673002 git-svn-id: http://skia.googlecode.com/svn/trunk@13042 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
* 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
* (re)add SkMask::getAddr() which now checks its pixel-size at runtime.Gravatar reed@google.com2011-10-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2488 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
* coding styleGravatar mike@reedtribe.org2011-04-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1092 2bbb7eff-a529-9590-31e7-b0007b416f81
* add ADD xfermodeGravatar reed@android.com2009-04-24
| | | | | | | | safely handle (don't draw) if the size of SkMask exceeds 31bits git-svn-id: http://skia.googlecode.com/svn/trunk@159 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