aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
* 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>
* Remove SK_IGNORE_DW_GRAY_FIX.Gravatar Ben Wagner2017-03-29
| | | | | | | | | Users have been updated and this define is no longer used. Change-Id: I0430039978171c16ffe19fb3037897bcdf313e42 Reviewed-on: https://skia-review.googlesource.com/10417 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Implement SkBlurDrawLooper with SkLayerDrawLooperGravatar Matt Sarett2017-03-28
| | | | | | | | | | | | This allows us to delete SkBlurDrawLooper (and leave only one draw looper implementation). BUG=skia: Change-Id: I549af86b81babf19e3649bdffffe2fdb0b308d5a Reviewed-on: https://skia-review.googlesource.com/10101 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Fix gaussianedge GMGravatar Robert Phillips2017-03-28
| | | | | | | Change-Id: Ia4523ea13992b325cb59f42e4458a199c7a98c4b Reviewed-on: https://skia-review.googlesource.com/10219 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* quiet some annoying logging in unit testsGravatar Mike Klein2017-03-27
| | | | | | | | | Noticed all these while adding some unit test support to ok. Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a Reviewed-on: https://skia-review.googlesource.com/10202 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* 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>
* Replace Thinkness with Thickness.Gravatar Ben Wagner2017-03-23
| | | | | | | | | | | | | The FontMetricsFlags::kUnderlineThinknessIsValid_Flag has a typo in it. Fortunately no user currently uses this enumeration value by name but instead uses the getter so the name can be updated. BUG=skia:6174 Change-Id: I810260d826482de1da8876cd9739d24b3bfb0f95 Reviewed-on: https://skia-review.googlesource.com/10050 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* 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>
* sk_fgetsize to not use ftell.Gravatar Ben Wagner2017-03-17
| | | | | | | | | | | | | 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>
* Only set dw antialias mode to grayscale for A8.Gravatar Ben Wagner2017-03-17
| | | | | | | | | | | | | The previous code would also set 'grayscale' for aliased which would then cause the code to use the new renderer, which has issues with aliased glyphs. BUG=skia:5416 Change-Id: Ia856322b59d0eba258522d73c3a4d827ab4429e1 Reviewed-on: https://skia-review.googlesource.com/9834 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Support pixel antialising in DirectWrite.Gravatar Ben Wagner2017-03-16
| | | | | | | | | | | | | DirectWrite2 supports pixel antialiasing and rendering without hinting. To maintain the infered size based decisions of the previous rendering, only use the new renderer when it is needed. BUG=skia:5416 Change-Id: Ia87fdf8fc91dc7ff0f0ce4284c90a5d79045308f Reviewed-on: https://skia-review.googlesource.com/9805 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Support pixel antialising in DirectWrite."Gravatar Mike Reed2017-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 34db1eee20ffea6e423284bb06824653efff645d. Reason for revert: breaks the chrome roll E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(287,49): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] GaspRange range{bitmapPPEM, bitmapPPEM, 0}; ^ {} E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(287,49): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] GaspRange range{bitmapPPEM, bitmapPPEM, 0}; ^ {} E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(290,59): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] range = GaspRange{bitmapPPEM, bitmapPPEM, 0}; ^ {} E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(290,59): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] range = GaspRange{bitmapPPEM, bitmapPPEM, 0}; ^ {} E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(338,39): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] GaspRange range = {0, 0xFFFF, 0}; ^ {} E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(338,39): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] GaspRange range = {0, 0xFFFF, 0}; ^ {} Original change's description: > Support pixel antialising in DirectWrite. > > DirectWrite2 supports pixel antialiasing and rendering without hinting. > > BUG=skia:5416 > > Change-Id: I215245b20dd403669dbccd37e34cb2fcd5e06431 > Reviewed-on: https://skia-review.googlesource.com/9145 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> > TBR=mtklein@google.com,bungeman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5416 Change-Id: Ic5f09abc3be8dd85d213a007780b3fe15fc11d92 Reviewed-on: https://skia-review.googlesource.com/9747 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Support pixel antialising in DirectWrite.Gravatar Ben Wagner2017-03-15
| | | | | | | | | | | DirectWrite2 supports pixel antialiasing and rendering without hinting. BUG=skia:5416 Change-Id: I215245b20dd403669dbccd37e34cb2fcd5e06431 Reviewed-on: https://skia-review.googlesource.com/9145 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix SkFILEStream.Gravatar Ben Wagner2017-03-10
| | | | | | | Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917 Reviewed-on: https://skia-review.googlesource.com/9498 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Mark function used as template parameter extern.Gravatar Ben Wagner2017-03-09
| | | | | | | | | | | | VC++19.10.2517 does not support the C++11 change to allow the address of internal linkage objects to be used as non-type template arguments. BUG=skia:6351 Change-Id: I7e1f628db794f950dfba7d043cf6d2fbf0a8c453 Reviewed-on: https://skia-review.googlesource.com/9496 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* DW last resort font default name not necessary.Gravatar Ben Wagner2017-03-08
| | | | | | | | | | | | | | | Currently in SkFontMgr_DirectWrite when trying to find some last resort font SystemParametersInfoW failing is considered a fatal error and so onLegacyCreateTypeface will return nullptr. Instead, treat failure of getDefaultFontFamily as ignorable and continue to the default default. BUG=chromium:697672 Change-Id: I1ea018627487fbd39b1d0eebad4c798346d09c94 Reviewed-on: https://skia-review.googlesource.com/9408 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkPDF: Always get advances at unitsPerEm.Gravatar Hal Canary2017-03-08
| | | | | | | | | | | | | * Work around BUG=chromium:696356 * SkTestScalerContext needs a return a em-size. * SkPDFFont::MakeVectorCache which always produces a glyph cache at emsize. Replaces vector_cache(). * Stop looking at fLastGlyphID and fEmSize in TypefaceMetrics. Change-Id: I28d93b8f62d461a60fa046e9aaf7fa6d116a7ee5 Reviewed-on: https://skia-review.googlesource.com/9324 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Tell PDF on Mac when a font is a variation font.Gravatar Ben Wagner2017-03-02
| | | | | | | | | | | | PDF needs to know when a font is a variation font so that it knows it cannot just embed the typeface. BUG=chromium:697916 Change-Id: I85091e444a235545f0f63fe131729c107bb664a0 Reviewed-on: https://skia-review.googlesource.com/9158 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Check that the FT_Face actually exists in ↵Gravatar Ben Wagner2017-03-02
| | | | | | | | | | | | | | | SkTypeface_FreeType::onGetVariationDesignPosition. All users of AutoFTAccess check the FT_Face for nullptr in case the FT_Face cannot actually be created. This check was overlooked in the recent addition of SkTypeface_FreeType::onGetVariationDesignPosition. BUG=chromium:697878 Change-Id: I92dfe845f2aecfa00bd4d088ac139f74c019c03d Reviewed-on: https://skia-review.googlesource.com/9151 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove SK_HAS_DWRITE_X defines.Gravatar Ben Wagner2017-03-01
| | | | | | | | | | | | While developing DirectWrite it was ncessary to support building with older Windows SDKs which may not have certain headers. Now that the minimum required Windows SDK is 8.1 (0x0603) we can remove these difficult to use macros to simplify future development. Change-Id: Ia780466b7c9b86198116c5974c43363f49a0ebac Reviewed-on: https://skia-review.googlesource.com/9124 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Call FT_Set_Default_Properties when available.Gravatar Ben Wagner2017-03-01
| | | | | | | | | | | | | | | | | | | FreeType 2.7.0 added the ability to read some global properties from environment variables to configure an FT_Library. However, this did not apply to FT_New_Library. After 2.7.1 FT_Set_Default_Properties was added so that users of FT_New_Library can also repect these properties. This also removes SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER and associated code since there are no users of this flag, the behavior it guards is now more or less in upstream FreeType, and the pattern in the code it guards is now in use for calling FT_Set_Default_Properties. BUG=skia:6165 Change-Id: I9fca86cc8b1bb9709c0b980330cf974455be3b57 Reviewed-on: https://skia-review.googlesource.com/9109 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* begin to hide details of SkPathEffectGravatar Mike Reed2017-02-26
| | | | | | | | | BUG=skia: Change-Id: I155d2370ae894e6000b6a768d02cf06bf5b3de6e Reviewed-on: https://skia-review.googlesource.com/8977 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add SkTypeface::getVariationDesignPosition.Gravatar Ben Wagner2017-02-24
| | | | | | | | | Allow users to query a typeface's position in variation design space. Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b Reviewed-on: https://skia-review.googlesource.com/8861 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Add SkTypeface::getVariationDesignPosition."Gravatar Ben Wagner2017-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f3d0c37dbcaf4ec271d5fe847becc9b1aa6f537. Reason for revert: <INSERT REASONING HERE> Original change's description: > Add SkTypeface::getVariationDesignPosition. > > Allow users to query a typeface's position in variation design space. > > Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed > Reviewed-on: https://skia-review.googlesource.com/8684 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7 Reviewed-on: https://skia-review.googlesource.com/8929 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add SkTypeface::getVariationDesignPosition.Gravatar bungeman2017-02-23
| | | | | | | | | Allow users to query a typeface's position in variation design space. Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed Reviewed-on: https://skia-review.googlesource.com/8684 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Write SkRegion fuzzerGravatar Kevin Lubick2017-02-20
| | | | | | | | | BUG=688987 Change-Id: I2ad1c53ea01185a77b662d2d86b0c6d36fcb63c7 Reviewed-on: https://skia-review.googlesource.com/8499 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Revert "Add SkTypeface::getVariationDesignPosition."Gravatar Ben Wagner2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 87e7f820f74a990a59fb8f1d5c182584ce586ecf. Reason for revert: Failed a test on Mac Original change's description: > Add SkTypeface::getVariationDesignPosition. > > Allow users to query a typeface's position in variation design space. > > Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198 > Reviewed-on: https://skia-review.googlesource.com/7130 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia65792083642dbe9333a62eb75d162931b57cffd Reviewed-on: https://skia-review.googlesource.com/8670 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add SkTypeface::getVariationDesignPosition.Gravatar Ben Wagner2017-02-17
| | | | | | | | | Allow users to query a typeface's position in variation design space. Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198 Reviewed-on: https://skia-review.googlesource.com/7130 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Implement SkHighContrastFilterGravatar Dominic Mazzoni2017-02-16
| | | | | | | | | | | | | | | | | This is a color filter to apply several contrast adjustments for users with low vision, including inverting the colors (in either RGB or HSL space), applying gamma correction, converting to grayscale, and increasing the contrast. BUG=skia:6235 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Icb8f3e290932d8bcd9387fb1f39dd20767e15cf6 Reviewed-on: https://skia-review.googlesource.com/7460 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Work around Mac x- and cap-height calculation.Gravatar bungeman2017-02-16
| | | | | | | | | | | | | | | | | With at least some system fonts and apparently all fonts from data the x-height and cap-height on at least 10.12.3 are always 0.6666 and .8888 of the ascent, respectively. The values from the 'OS/2' table appear to be read, but then the values are overwritten. Work around this by using the values from the 'OS/2' table when available. This also removes fFUnitMatrix as it is no longer used. BUG=skia:6203 Change-Id: Ib79d9d32bca77797de043499c854c35e5ef3aa4b Reviewed-on: https://skia-review.googlesource.com/8452 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* return and take SkImageGenerator as unique_ptrGravatar Mike Reed2017-02-15
| | | | | | | | | | BUG=skia: Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186 Reviewed-on: https://skia-review.googlesource.com/8444 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* SkScalarMul is deprecatedGravatar Mike Reed2017-02-14
| | | | | | | | | BUG=skia: Change-Id: I88ecfe9d4c72506f6b1a0e0dfadd2a5c171a6cb6 Reviewed-on: https://skia-review.googlesource.com/8353 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* 'gasp' to control symmetric rendering on Windows.Gravatar Ben Wagner2017-02-10
| | | | | | | | | | | | | | | | Currently Skia tries hard to use symmetric rendering with DirectWrite as often as possible. However, particularly on Windows 7 with CJK fonts, thin horizontal strokes can be rendered without sufficient contrast because the font was relying on the 6x1 oversampling for what is effecitvely drop-out control. This change will only allow symmetric rendering if the font allows it in the 'gasp' table. BUG=chromium:645055 Change-Id: I45a9d5e4a0b49bb969c44fb20dc92528dfe9c48d Reviewed-on: https://skia-review.googlesource.com/8268 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Roll minimum picture version up to 44."Gravatar Robert Phillips2017-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e037d12625b1dbb7952ae8a6553d6830e8b3ebbf. Reason for revert: Checking to see if this broke the Chrome DEPS roll Original change's description: > Roll minimum picture version up to 44. > > This is the version produced by Chrome M54. M56 is stable now. > > I am most interested in deleting SkBitmapSourceDeserializer, > because it awkwardly calls from core into effects (SkImageSource). > > Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61 > Reviewed-on: https://skia-review.googlesource.com/8286 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I9202591c7945c9421f335e544bf12461e38acdc6 Reviewed-on: https://skia-review.googlesource.com/8305 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Replace kCTFontXXXOrientation with kCTFontOrientationXXX.Gravatar bungeman2017-02-09
| | | | | | | | | | | | | | | | | English has a quite complex order of adjectives, and adjectives come before the noun. However, this order often clashes with the desire for clear hierarchy in naming. In the kingdom of nouns the nouns come first. A great eye at Apple noticed a lack of dicipline in the naming of the orientation constants and ranamed them to conform, deprecating the original names. To avoid warnings which become errors, Skia must now use the new names for these constants. BUG=chromium:408571 Change-Id: I5ccce4a3353157e1e8780c3a169099cec76b7637 Reviewed-on: https://skia-review.googlesource.com/8300 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Roll minimum picture version up to 44.Gravatar Mike Klein2017-02-09
| | | | | | | | | | | | This is the version produced by Chrome M54. M56 is stable now. I am most interested in deleting SkBitmapSourceDeserializer, because it awkwardly calls from core into effects (SkImageSource). Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61 Reviewed-on: https://skia-review.googlesource.com/8286 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Properly create CTFontDescriptor from SkFontStyle.Gravatar bungeman2017-02-09
| | | | | | | | | | | There has been a long standing TODO about adding weight, width, and slant properly to created CTFontDescriptors. Now that the correct mappings are known, add these values to the descriptors. Change-Id: I37c3b892c2eb9dc3bb63399d14b535737c4fafb3 Reviewed-on: https://skia-review.googlesource.com/8273 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Make src/effects explicitly optional.Gravatar Mike Klein2017-02-09
| | | | | | | | | | | | | | This adds a GN argument to disable src/effects, which can cut about 1M off libskia. It's not the first place you'd go to trim code size, but after turning off easy big things like Ganesh, it starts looking big. I tested that fiddle builds and links. It uses Skia but not effects. Most of our test apps use effects and can't build in this new mode. Change-Id: I9b5d6e9289a87bc08eedf6d202d0eabe754da41a Reviewed-on: https://skia-review.googlesource.com/8263 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Include correct header in SkFontMgr_custom_empty_factory.cpp.Gravatar Ben Wagner2017-02-09
| | | | | The SkFontMgr_New_Custom_Empty function used to be declared in SkFontMgr_custom.h, but is now declared in SkFontMgr_empty.h.
* Split custom font managers.Gravatar Ben Wagner2017-02-09
| | | | | | | | | | | | Some users would like to use the empty font manager, but the directory gont manager brings in extra dependencies to work which would otherwise be unneeded. Allow these users to build just the bits of code they actually need. Change-Id: Ib029ef2682883509bad5a2aa39f1ef55631f4d8a Reviewed-on: https://skia-review.googlesource.com/8200 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.Gravatar bungeman2017-02-07
| | | | | | | | | | | | | | Currently create_descriptor will crash if handed a familyName which is nullptr. Instead it should simply create a descriptor without a family name and allow CoreText to resolve a default font. This further simplifies default font handling on Mac. BUG=skia:6196 Change-Id: I0a2d081240e4cb5bd51dd3516ea2595277055fe0 Reviewed-on: https://skia-review.googlesource.com/8071 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>