aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
* 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>
* Clean up more references to GYP.Gravatar Mike Klein2017-02-06
| | | | | | | | | | Delete files only used by GYP, and files that used GYP. Neither can possibly be actively used. Beyond that, just a couple doc tweaks. Change-Id: I0220d7226e7bb9ed7c54a7d8f2906a718313c521 Reviewed-on: https://skia-review.googlesource.com/8062 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com>
* Implement getFamilyName for stream fonts on Linux.Gravatar Ben Wagner2017-01-26
| | | | | | | | | | | | | | When SkFontMgr_fontconfig and SkFontMgr_FontConfigInterface create a typeface from data they do not store the default font name and getFamilyName will return the empty string. All of the code to handle this properly now exists, it just needs to be hooked up. BUG=skia:1508 Change-Id: I75f2a598a5451babb4a9ceb5e9a9e9d3daa41d60 Reviewed-on: https://skia-review.googlesource.com/7506 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Support fCapHeight in SkScalerContext_DWGravatar Koji Ishii2017-01-23
| | | | | | | | | BUG=chromium:681857 Change-Id: Ia97354d7798eb685351a98ff559bcf176a67af18 Reviewed-on: https://skia-review.googlesource.com/7380 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove public APIs that use SkDataTable.Gravatar Herb Derby2017-01-23
| | | | | | | | Change-Id: Ibb8f987efc585713a6f8061c72fb416d07be13b1 Reviewed-on: https://skia-review.googlesource.com/7352 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove SkColorCubeFilter. It is unused.Gravatar Mike Klein2017-01-21
| | | | | | | Change-Id: Iec5fc759e331de24caea1347f9510917260d379b Reviewed-on: https://skia-review.googlesource.com/7363 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Decode system font weight correctly on Mac.Gravatar bungeman2017-01-13
| | | | | | | | | | The -1 to 1 weights reported by CTFontDescriptors have different mappings depending on if the CTFont is native or created from a CGDataProvider. Change-Id: I725b04a31c224a4b01c0763137fa04bb4088def7 Reviewed-on: https://skia-review.googlesource.com/6979 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove SK_LEGACY_FONTMGR_FACTORY.Gravatar Ben Wagner2017-01-11
| | | | | | | | | | | | | SkFontMgr factories now return sk_sp and the legacy factories are no longer used and can be removed. BUG=skia:5077 Change-Id: Ieaff8555b297d1db157f8b78cdd6e7d07a3b5490 Reviewed-on: https://skia-review.googlesource.com/6894 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkTypes.h : move SkAutoMalloc into SkAutoMalloc.hGravatar Hal Canary2017-01-11
| | | | | | | | | | | | | | | | * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'" This reverts commit c456b73fef9589bbdc5eb83eaa83e53c357bb3da. Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab Reviewed-on: https://skia-review.googlesource.com/6886 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h"Gravatar Kevin Lubick2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5494f117086d712855e4b6289c58c92d1549bcf. Reason for revert: Broke Google3 Original change's description: > SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h > > * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). > > * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h > > * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" > > Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88 > Reviewed-on: https://skia-review.googlesource.com/4543 > Reviewed-by: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> > TBR=halcanary@google.com,bungeman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie8bd176121c3ee83c110d66c0d0ac65e09bfc9c5 Reviewed-on: https://skia-review.googlesource.com/6884 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* SkTypes.h : move SkAutoMalloc into SkAutoMalloc.hGravatar Hal Canary2017-01-11
| | | | | | | | | | | | | | * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr). * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);" Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88 Reviewed-on: https://skia-review.googlesource.com/4543 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove SkUseTestFontConfigFile.Gravatar Ben Wagner2017-01-10
| | | | | | | | | | | | This method and its associated globals are no longer used by any user and can now be removed. BUG=skia:2817 Change-Id: Ia627e2494f568a733999b980aec9284467d2640d Reviewed-on: https://skia-review.googlesource.com/6821 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Separate SkArithmeticImageFilter from SkXfermodeImageFilter.Gravatar Brian Salomon2017-01-09
| | | | | | | Change-Id: I145eed7276456b546ca5c66bc1a0f0f74a84f138 Reviewed-on: https://skia-review.googlesource.com/6728 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Stage SkFontMgr factories to return smart pointers.Gravatar Ben Wagner2017-01-04
| | | | | | | | | | | | | All the SkFontMgr factories currently return bare pointers and sometimes even document the ownership rules. Since such factories can be implemented by external ports, the ownership rules should be explicit in order to prevent simple reference counting issues. Change-Id: I25b598ce0954cd473a3fb1f8adc0cb86331583ca Reviewed-on: https://skia-review.googlesource.com/6533 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* clean up non-ASCII commentsGravatar Hal Canary2017-01-03
| | | | | | | Change-Id: I07ad00133f6a938de70a94024a0ebe36c6c542bb Reviewed-on: https://skia-review.googlesource.com/6524 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Clean up SkFontHost_Mac ownership.Gravatar bungeman2016-12-21
| | | | | | | | | | | | This clarifies ownership rules throughout SkFontHost_Mac.cpp, as well as tidying up various bits of code. Clarifying ownership means replacing AutoCFRelease with UniqueCFRef which is based on std::unique_ptr. Most of the cleanup is removing now dead code and properly indenting. Change-Id: I6d3a225d62b5d0f2f48a9e70c1a24317faa06747 Reviewed-on: https://skia-review.googlesource.com/6297 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Mark CG and WIC images as srgbGravatar Matt Sarett2016-12-16
| | | | | | | | | | | | | | Otherwise they look funny when we draw them to srgb (drawing untagged srcs to srgb canvas is undefined). The image generator tests were recently changed to run on srgb. BUG=skia: Change-Id: I6ec07dbf736ed2a16a5db89b4028a44a98037f70 Reviewed-on: https://skia-review.googlesource.com/6182 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>