aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter.Gravatar Sadrul Habib Chowdhury2017-08-18
| | | | | | | | | | | | The SkiaRenderer in chromium is going to use the overdraw canvas and filter for measuring overdraw. Move these headers out of src/ into include/. Bug: chromium:704285 Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0 Reviewed-on: https://skia-review.googlesource.com/36160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove uses of sk_throw.Gravatar Ben Wagner2017-08-17
| | | | | | | | | | | The sk_throw macro is now an alias to SK_ABORT, but is often used when other macros better describe the situation. This change replaces sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate. Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3 Reviewed-on: https://skia-review.googlesource.com/35882 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Move lang to list in Android font manager.Gravatar Ben Wagner2017-08-14
| | | | | | | Change-Id: Ia4af2769f4761e6b444ed0c232c48199872f3acc Reviewed-on: https://skia-review.googlesource.com/33480 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Use kLow_SkFilterQuality in generateGlyphImageGravatar Robert Phillips2017-08-14
| | | | | | | | | This reduces jank when flinging a page of emoji on Android (I have separately shared out a spreadsheet). Arguably, the quality loss should be acceptable since we shouldn't be down-scaling that much (magnitude-wise not frequency-wise). Ideally, we would add a raster mode where we would draw at the correct size w/o generating the mip maps. Change-Id: Id91d638db1b2457567e54c264ed3fa5d10316976 Reviewed-on: https://skia-review.googlesource.com/33763 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove subpixel positioning implies no bytecode hinting."Gravatar Ben Wagner2017-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 880768032d7bd1528dc84f5b4408d4fa418bae7d. Reason for revert: Pixel tests, and gfx tests can't handle hinting. Original change's description: > Remove subpixel positioning implies no bytecode hinting. > > SkTypeface_FreeType::onFilterRec currently assumes that if we're asked > to do subpixel positioning, don't do bytecode hinting. The idea was that > both could not be satisfied at the same time, so pick something. This is > no longer true, as with the v40 interpreter it is possible to get > subpixel positioned but bytcode hinted glyphs. > > BUG=skia:6931 > > Change-Id: Ifaeff20c121d6bb4b9287f552e383547eb6d5d49 > Reviewed-on: https://skia-review.googlesource.com/32201 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,liyuqian@google.com,reed@google.com Change-Id: Idb1ee50d271846bdf962986914f6b75e3aa817c8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6931 Reviewed-on: https://skia-review.googlesource.com/33586 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove subpixel positioning implies no bytecode hinting.Gravatar Ben Wagner2017-08-11
| | | | | | | | | | | | | | | | SkTypeface_FreeType::onFilterRec currently assumes that if we're asked to do subpixel positioning, don't do bytecode hinting. The idea was that both could not be satisfied at the same time, so pick something. This is no longer true, as with the v40 interpreter it is possible to get subpixel positioned but bytcode hinted glyphs. BUG=skia:6931 Change-Id: Ifaeff20c121d6bb4b9287f552e383547eb6d5d49 Reviewed-on: https://skia-review.googlesource.com/32201 Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove SkLightingShader and associated classesGravatar Robert Phillips2017-08-07
| | | | | | | | Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5 Reviewed-on: https://skia-review.googlesource.com/31140 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* clean up useage of SkFloatBitsGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613 Reviewed-on: https://skia-review.googlesource.com/31222 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* clang on windows supportGravatar Mike Klein2017-07-31
| | | | | | | | | | | | | | | | | 1) Run python bin/fetch-clang-win 2) Set clang_win = "../bin/clang_win" 3) ??? 4) Profit Most changes here are to pass the right -mfoo flags to Clang to enable advanced instruction sets, or fixed warning-as-errors. BUG=skia:2679 Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921 Reviewed-on: https://skia-review.googlesource.com/28740 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Don't re-enter mutex in SkFontMgr_fontconfig.Gravatar Ben Wagner2017-07-27
| | | | | | | | | | | | | | | | | | | | | The FCLocker lock cannot be held while calling fTFCache::add. The ~SkTypeface_fontconfig method must take the FCLocker lock to destroy its FcPattern since a typeface may be destroyed by any last owner. However, fTFCache may be the last owner of some of its cached typefaces, and so a purge when calling ::add to make space for the new entry may cause a typeface to be destroyed. As a result, createTypefaceFromFcPattern must not hold the FCLocker lock when calling fTFCache::add. Fortunately, the FCLocker lock is only needed to serialize calls into FontConfig. If acquire and release were free then they would be used around each individual call to FontConfig. As a result it is fine to give up the lock at any point in Skia code so long as no FontConfig calls are made while the FCLocker lock is not held. Change-Id: I37224d4b38bf88ace482496ce7530c84158d2d2e Reviewed-on: https://skia-review.googlesource.com/27663 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* implement serialization for tosrgbGravatar Mike Reed2017-07-25
| | | | | | | | | | Bug: skia: Change-Id: I365f3398f74dbaaeb22c9246255c03b078386877 Reviewed-on: https://skia-review.googlesource.com/26507 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* remove (unused?) arcto patheffectGravatar Mike Reed2017-07-24
| | | | | | | | Bug: skia: Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11 Reviewed-on: https://skia-review.googlesource.com/25981 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add strikeout font metrics.Gravatar Ben Wagner2017-07-21
| | | | | | | | | | | | | | This also updates create_test_font so that it can be built, compiles, and uses SkFontStyle instead of SkTypeface::Style. BUG=b/63669723 Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f Reviewed-on: https://skia-review.googlesource.com/24740 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add aliases mapping Windows CJ fonts to Noto Serif CJKGravatar Jungshik Shin2017-07-19
| | | | | | | | | | | | | | | | | CrOS will have Noto Serif CJK as the default serif fonts for CJK. Aliases in Skia need to be updated. See https://chromium-review.googlesource.com/c/576708/ and https://chromium-review.googlesource.com/c/576789/ BUG=chromium:722470 TEST=With all the related CLs in, Noto Serif CJK {JP,SC,TC} are used when MS (P)Mincho,(N)Simsun,(P)MingLiu are requested. Change-Id: I8340c2b460671c0b2854360a89b051e0e9e8d57c Reviewed-on: https://skia-review.googlesource.com/24521 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkTypeface: fix non-determinism on AdvacedMetricsGravatar Hal Canary2017-07-06
| | | | | | | | | Calculate fStemV and fCapHeight using SkPaint in SkPDFFont if needed. Change-Id: Iaf762e6c44178fac659dfe9fa312d0caed9138ae Reviewed-on: https://skia-review.googlesource.com/21535 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Load FreeType glyph bitmap before emboldening.Gravatar Ben Wagner2017-06-27
| | | | | | | | | | | | | If a bitmap glyph was loaded with FT_LOAD_BITMAP_METRICS_ONLY then the glyph must be re-loaded without this flag before accessing the bitmap. BUG=chromium:725975 Change-Id: If5e5a6844e9c32238560135e141fea7f77ad7fac Reviewed-on: https://skia-review.googlesource.com/20830 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Clip FreeType glyph bitmap to mask.Gravatar Ben Wagner2017-06-23
| | | | | | | | | | | | | | | | | | | Skia has for some time assumed that when using FT_Render_Glyph with one of the LCD render modes that one extra pixel would be applied to each side of the resulting bitmap. FreieType has changed to make this more conservative when possible, so the pre-allocated SkMask and the generated FT_Bitmap may no longer agree on the size and origin. This change ensures the SkMask and FT_Bitmap are the same size and their origins align. This is not an ideal long term fix, but is both simple and localized for easy and quick back-porting, should that become necessary. BUG=skia:6663 Change-Id: I49ec8f45376be8d867e8aef54eab79537731c310 Reviewed-on: https://skia-review.googlesource.com/20327 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* remove SkImageEncoder_none.cppGravatar Hal Canary2017-06-21
| | | | | | | | | | | msarett@ realized that if all of the encoders were disabled, then it is equivalent to SkImageEncoder.cpp. Change-Id: Ib3d5d7d061e1a60d7081689430107fb250903d5c Reviewed-on: https://skia-review.googlesource.com/20440 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkXfermode no longer needs to e a flattenableGravatar Mike Reed2017-06-10
| | | | | | | | | | SkArithmeticMode is unreachable, so delete it Bug: skia: Change-Id: Ibe4c48fcf756280569c4b302da8d96bd4e21b717 Reviewed-on: https://skia-review.googlesource.com/19394 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Delete SkGaussianEdgeShader""Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d14f936cc09de2a37c05c7af2cf60aa31f74722. Reason for revert: Android fix merged. Original change's description: > Revert "Delete SkGaussianEdgeShader" > > This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. > > Reason for revert: pending Android fix merge. > > Original change's description: > > Delete SkGaussianEdgeShader > > > > No longer used. > > > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > > Reviewed-on: https://skia-review.googlesource.com/18132 > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > > > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > > Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 > Reviewed-on: https://skia-review.googlesource.com/18156 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ia6c97a79a6425a28fab49984691505bf89ac9736 Reviewed-on: https://skia-review.googlesource.com/18227 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Delete SkGaussianEdgeShader"Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. Reason for revert: pending Android fix merge. Original change's description: > Delete SkGaussianEdgeShader > > No longer used. > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > Reviewed-on: https://skia-review.googlesource.com/18132 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 Reviewed-on: https://skia-review.googlesource.com/18156 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Delete SkGaussianEdgeShaderGravatar Florin Malita2017-05-30
| | | | | | | | | No longer used. Change-Id: I65a61696060ca19f528066ea587e140798450e36 Reviewed-on: https://skia-review.googlesource.com/18132 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* move all details for dashing into implGravatar Mike Reed2017-05-24
| | | | | | | | Bug: skia: Change-Id: I035603ad75158d9984cce7807bef6a668d9eb014 Reviewed-on: https://skia-review.googlesource.com/17793 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "sk_fgetsize to not use ftell."Gravatar Leon Scroggins2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eefa289a214ea3917e5e00554f231adb5ad6f712. Reason for revert: Causing failures in BitmapFactoryTest. b/38233042 Original change's description: > sk_fgetsize to not use ftell. > > The previous version of sk_fgetsize used ftell and fseek to compute > the size of a file. There are so many issues with this that it is called > out by securecoding.cert.org as FIO19-C as a thing not to do. We already > have correct code for computing the size of a file in the mmap code, so > use that instead. > > Change-Id: I1d771124989d0ec1523f6d858814ee563263213a > Reviewed-on: https://skia-review.googlesource.com/9860 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> > TBR=bungeman@google.com,scroggo@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ie9392dde8747ae7c74ebfa00153705e316e841a2 Reviewed-on: https://skia-review.googlesource.com/17705 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Hide SkPerlinNoiseShader impl detailsGravatar Florin Malita2017-05-18
| | | | | | | | | | Move the shader impl to a private class, leave SkPerlinNoiseShader as a factory class only (similar to e.g. SkLightingShader). Change-Id: Ic1180db8f5dfd3d8f6fba133c6bf6bbdfa4f97a4 Reviewed-on: https://skia-review.googlesource.com/17318 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add new SkImageGenerator::getPixels() API, deprecate the oldGravatar Matt Sarett2017-05-12
| | | | | | | | | | | | This is fairly aggressive in that it will break any client that is currently using SkImageGenerator with kIndex8. I'm guessing that we don't have any clients doing that. Bug: skia:6620 Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca Reviewed-on: https://skia-review.googlesource.com/16601 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Revert "SkTypeface::getAdvancedMetrics(): cleanup""Gravatar Hal Canary2017-05-05
| | | | | | | | | | | | | | | | | | | This reverts commit 59ad782b2b05b07aa6eb961aa4d62e934093cbd1. - SkAdvancedTypefaceMetrics is a struct not a class - SkTypeface::PerGlyphInfo is gone - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr. - [on]getAdvancedMetrics no longer has parameters. (Only caller always used same arguments.) - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers. - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt Change-Id: I91b56e60f7d9de7d46c426c6bd34ce124e0cf00e Reviewed-on: https://skia-review.googlesource.com/15360 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypeface::getAdvancedMetrics(): cleanup"Gravatar Hal Canary2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cef018896e5cad8eb46a536b60cdf79ebe2b0191. Reason for revert: broke chromium roll (windows). Original change's description: > SkTypeface::getAdvancedMetrics(): cleanup > > - SkAdvancedTypefaceMetrics is a struct not a class > - SkTypeface::PerGlyphInfo is gone > - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g > - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g > - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr. > - [on]getAdvancedMetrics no longer has parameters. (Only caller always > used same arguments.) > - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers. > - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt > > Change-Id: I37571ebcc383ba9eb21bc20c60c734e3ca317582 > Reviewed-on: https://skia-review.googlesource.com/15311 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> > TBR=halcanary@google.com,bungeman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I84c7d53df566aaf83427e3368edaa02b7b5a9cb8 Reviewed-on: https://skia-review.googlesource.com/15319 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypeface::getAdvancedMetrics(): cleanupGravatar Hal Canary2017-05-04
| | | | | | | | | | | | | | | | | - SkAdvancedTypefaceMetrics is a struct not a class - SkTypeface::PerGlyphInfo is gone - s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g - s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g - [on]getAdvancedMetrics now return unique_ptr rather than bare ptr. - [on]getAdvancedMetrics no longer has parameters. (Only caller always used same arguments.) - SkAdvancedTypefaceMetrics uses C++11 in-class member initializers. - SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt Change-Id: I37571ebcc383ba9eb21bc20c60c734e3ca317582 Reviewed-on: https://skia-review.googlesource.com/15311 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* add virtual to support CTFontRefGravatar Mike Reed2017-05-04
| | | | | | | | Bug: skia:6583 Change-Id: I8525e63d3f43467289360d4b15c0153d2a43539e Reviewed-on: https://skia-review.googlesource.com/15194 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkFontMgr::matchFamily should not crash on nullptr.Gravatar bungeman2017-05-01
| | | | | | | | | | | | While all systems can resolve a font from just a style request (without a name) almost no systems specify a default font family. BUG=skia:6574 Change-Id: If7c81808b62cd5d8212bce2eb4d9c476c45af80a Reviewed-on: https://skia-review.googlesource.com/14902 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag""Gravatar Matt Sarett2017-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0122af08f6af0dee490e1a4f35b552377d0d4753. Reason for revert: Fixed Android callsite Original change's description: > Revert "Delete copyTo(Allocator), hide copyTo() behind flag" > > This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971. > > Reason for revert: Looks like I missed something I was supposed to delete in Android. > > Original change's description: > > Delete copyTo(Allocator), hide copyTo() behind flag > > > > Replace uses of copyTo() in Skia. > > > > Bug: skia:6464 > > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 > > Reviewed-on: https://skia-review.googlesource.com/14502 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > > > TBR=msarett@google.com,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e > Reviewed-on: https://skia-review.googlesource.com/14602 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,reviews@skia.org,reed@google.com Change-Id: I81659a820f79f1958fda23cb62513065b57db99d Reviewed-on: https://skia-review.googlesource.com/14640 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Delete copyTo(Allocator), hide copyTo() behind flag"Gravatar Matt Sarett2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971. Reason for revert: Looks like I missed something I was supposed to delete in Android. Original change's description: > Delete copyTo(Allocator), hide copyTo() behind flag > > Replace uses of copyTo() in Skia. > > Bug: skia:6464 > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 > Reviewed-on: https://skia-review.googlesource.com/14502 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e Reviewed-on: https://skia-review.googlesource.com/14602 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Delete copyTo(Allocator), hide copyTo() behind flagGravatar Matt Sarett2017-04-27
| | | | | | | | | | Replace uses of copyTo() in Skia. Bug: skia:6464 Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 Reviewed-on: https://skia-review.googlesource.com/14502 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Finish removing GrContext param from onRefEncodedDataGravatar Brian Osman2017-04-27
| | | | | | | | | | | TBR=reed@roogle.com Bug: skia:5485 Change-Id: Ia4ed45ffc39f2ba9a80d4a1001208079142ae985 Reviewed-on: https://skia-review.googlesource.com/14323 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SK_IGNORE_GASP_VERSION_CHECK.Gravatar Ben Wagner2017-04-26
| | | | | | | | | All users have now been updated and this define is no longer used. Change-Id: Ib701b6e31f7c0958eed3d97e033b334e09fa9bb0 Reviewed-on: https://skia-review.googlesource.com/14365 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove compressed texture support from cacheratorGravatar Brian Osman2017-04-25
| | | | | | | | | | | All variants of (on)?[rR]efEncoded(Data)? no longer need a GrContext parameter. Bug: skia:5485 skia:4971 Change-Id: If4f5e785718d5522eb3df8588318ccb8a02a5749 Reviewed-on: https://skia-review.googlesource.com/14269 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Improve variation comment for iOS.Gravatar bungeman2017-04-25
| | | | | | | | | | | | CTFontCopyVariationAxes returns nullptr for fonts which began life with CGFontCreateWithDataProvider on macOS 10.10 and earlier and iOS 9 and earlier. The issue was fixed in maxOS 10.11 and iOS 10. Improve the existing comments to make this clear. Change-Id: I0de1734e266d30aab7d38d0dd752f66259f677d9 Reviewed-on: https://skia-review.googlesource.com/14278 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Only respect version 1 gasp tables for symmetric.Gravatar Ben Wagner2017-04-24
| | | | | | | | | | When determining whether or not to use symmetric rendering, only look at the gasp table if it's version 1. Change-Id: Ib64ec1853545eb2c467a9e280d9e00f51e8b0aa8 Reviewed-on: https://skia-review.googlesource.com/13863 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Dominik Röttsches <drott@google.com>
* Symmetric rendering when >20px with DirectWrite.Gravatar Ben Wagner2017-04-14
| | | | | | | | | | | | | If the font has a gasp table use it to determine symmetric. Otherwise, use symmetric if the the font isn't hinted or is >20px. The remaining cases use non-symmetric. BUG=chromium:706792,skia:6432 Change-Id: I91b66a9615aae27c195e1545298a9d36bc58a705 Reviewed-on: https://skia-review.googlesource.com/11400 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix advances for aliased text with DirectWrite.Gravatar Ben Wagner2017-04-14
| | | | | | | | | | | | | The existing code assumes that GetGdiCompatibleGlyphMetrics transform parameter acts the same as the GetGlyphOutlineW lpmat2 parameter. However, it appears this is very much not true. BUG=skia:6499 Change-Id: I88c762b27acd09cc746da4d6e2b901540876908a Reviewed-on: https://skia-review.googlesource.com/13479 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Set the kMultiMaster_FontFlag in DirectWrite.Gravatar Ben Wagner2017-04-07
| | | | | | | | | | | | DirectWrite can now produce system font typefaces which are variations, so mark these as multiple masters so printing knows what to do. BUG=chromium:697916 Change-Id: Idf09ebba3c7002a09ff2e4a2dbae13dbce4e79d4 Reviewed-on: https://skia-review.googlesource.com/12101 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* SkTypeface:: populate_glyph_to_unicode uniformly across platformsGravatar Hal Canary2017-04-07
| | | | | | | Change-Id: I7edce3c38b4dc0261d425c26a443df9a1f25b32e Reviewed-on: https://skia-review.googlesource.com/11786 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypeface_win_dw: populate_glyph_to_unicode uses lowest unicharGravatar Hal Canary2017-04-07
| | | | | | | | | BUG=chromium:538133 BUG=chromium:359065 Change-Id: I8208efc63579e0f1ebb77680beae2cd08cdba547 Reviewed-on: https://skia-review.googlesource.com/11681 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* Use the rounded text size for gasp.Gravatar Ben Wagner2017-04-05
| | | | | | | | | | | | | When comparing against gasp ranges always use the rounded (gdi) size. Previously the truncated size was used, but it appears other implementations are using the rounded size. BUG=chromium:706693 Change-Id: I185cdf5b905261038e5150a04eef1b99bf73d875 Reviewed-on: https://skia-review.googlesource.com/11354 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Use the rounded text size for gasp.Gravatar Ben Wagner2017-03-30
| | | | | | | | | | | | | | When comparing against gasp ranges always use the rounded (gdi) size. Previously the truncated size was used, but it appears other implementations are using the rounded size. BUG=chromium:706693 Change-Id: I0f545175bf2d5f4e8db610b26c2f3e21a89eeb2a Reviewed-on: https://skia-review.googlesource.com/10751 Reviewed-by: Dominik Röttsches <drott@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Use last value for axis for variation position.Gravatar bungeman2017-03-30
| | | | | | | | | | | | | SkFontArguments::VariationPosition may be over specified. If there are multiple values for a given axis, ensure the last value specified is used, since that's what css-fonts-4 requires. BUG=chromium:674878 Change-Id: I6704c15c520c89efb9ee84659a3e16e0d07691c9 Reviewed-on: https://skia-review.googlesource.com/10513 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Use FontWeight symbols when available on Mac.Gravatar bungeman2017-03-29
| | | | | | | | | | | | | | Newer versions of macOS have NSFontWeightXXX symbols and iOS has UIFontWeightXXX symbols to provide the conversion between [-1, 1] CTFontDescriptor weights and [0, 1000] CSS weights. Currently the values these symbols provide are hard coded (for expediency), but the symbols should be used when available since the values may change without notice. Change-Id: I0875c6a96c5b14e456f91bccf7a84f0306a3d63a Reviewed-on: https://skia-review.googlesource.com/10163 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>