aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fonts/SkFontMgr_indirect.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "migrate to sk_sp for SkFontMgr API""Gravatar Mike Reed2017-09-26
| | | | | | | | | | This reverts commit f40ae1a4b5365620463bd63b5140bd3fc78894a1. Bug: skia: Change-Id: I752606de92ea405d6e50219c98030409b00a2841 Reviewed-on: https://skia-review.googlesource.com/51160 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "migrate to sk_sp for SkFontMgr API"Gravatar Mike Reed2017-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4bf296be2821d2bdd0afabae9fdfe18e7e9b59cb. Reason for revert: need guard for flutter Original change's description: > migrate to sk_sp for SkFontMgr API > > Bug: skia: > Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8 > Reviewed-on: https://skia-review.googlesource.com/48740 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=bungeman@google.com,reed@google.com Change-Id: Ib0b2d00fcbcdb6131444f94d1046df6dae24f551 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/50940 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* migrate to sk_sp for SkFontMgr APIGravatar Mike Reed2017-09-25
| | | | | | | | Bug: skia: Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8 Reviewed-on: https://skia-review.googlesource.com/48740 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: 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>
* 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>
* s/SkAutoTUnref/sk_sp/ in src/ part 1Gravatar Hal Canary2016-11-07
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4480 Change-Id: I7d3219b02ad5094785e1b7635a9482e69aadbc8c Reviewed-on: https://skia-review.googlesource.com/4480 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Move to SkDataTable::MakeXXX and sk_sp.Gravatar bungeman2016-08-05
| | | | | | | | Change SkDataTable::NewXXX to SkDataTable::MakeXXX and return sk_sp. This updates users of SkDataTable to sk_sp as well. There do not appear to be any external users of these methods. Review-Url: https://codereview.chromium.org/2211143002
* Modernize and trim down SkOnce.Gravatar mtklein2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | The API and implementation are very much simplified. You may not want to bother reading the diff. As is our trend, SkOnce now uses <atomic> directly. Member initialization means we don't need SK_DECLARE_STATIC_ONCE. SkSpinlock already works this same way. All uses of the old API taking an external bool* and Lock* were pessimal, so I have not carried this sort of API forward. It's simpler, faster, and more space-efficient to always use this single SkOnce class interface. SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally. This API refactoring opens up the opportunity to fuse those into a single three-state byte if we'd like. No public API changes. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894893002 Review URL: https://codereview.chromium.org/1894893002
* Remove SK_VERY_LEGACY_CREATE_TYPEFACE.Gravatar bungeman2016-04-13
| | | | | | | | | The flag and code it guards are no longer used. TBR=reed This just removes dead code. Review URL: https://codereview.chromium.org/1882803002
* Begin switch to SkFontStyle for legacy calls.Gravatar bungeman2016-04-12
| | | | | | | | | | | | | | | | | | | This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides only the old interface. Ideally, everyone would switch directly to SkFontMgr and use one of the newer calls, but there is currently no path for current users to get there. This updates all the internals to use SkFontStyle, after switching these over the higher level APIs can be switched. The Chromium follow on patch can be seen at https://crrev.com/1877673002 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002 TBR=reed This doesn't really change API, just modernizes it. Review URL: https://codereview.chromium.org/1873923002
* detach -> releaseGravatar mtklein2016-03-16
| | | | | | | | | | | | | The C++ standard library uses the name "release" for the operation we call "detach". Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete). This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release". BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002 Review URL: https://codereview.chromium.org/1809733002
* Factor CSS3 matching rules.Gravatar bungeman2015-11-12
| | | | | | | | | | | | This factors out the CSS3 matching rules, creates tests for it, and uses it with the GDI font manager. BUG=chromium:554238,skia:4037 TBR=reed@google.com No public API changes. Review URL: https://codereview.chromium.org/1438113002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Clean up a few includes, introduce iwyu.Gravatar bungeman2015-07-29
| | | | | | | | | The current include-what-you-use with current clang is much less noisy and more useful than it has been in the past. This change introduces a few IWYU directives (which are helpful documentation for humans as well) and fixes a few sets of includes. Review URL: https://codereview.chromium.org/1207893002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* SkTypeface to use SkStreamAsset.Gravatar bungeman2015-01-27
| | | | | | | SkTypeface already requires typeface streams to support SkStreamAsset in practice, and in practice all users are already supplying them. Review URL: https://codereview.chromium.org/869763002
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Remove SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER.Gravatar bungeman2014-11-10
| | | | | | | | | This removes the old guarded code and enables the new api introduced with "Update fontMgr to take list of bcp47 language tags." c20386e3937d3d398ac9b35f9c7d997e972ade98 . Blink on Android is already using the new code. Review URL: https://codereview.chromium.org/705843004
* Update fontMgr to take list of bcp47 language tags.Gravatar bungeman2014-10-23
| | | | | | | | | This will enable clients to pass more than one bcp47 tag to ensure that the most appropriate font is selected. BUG=chromium:422180 Review URL: https://codereview.chromium.org/670243002
* Clean up SkOnce usage in SkFontMgr_Indirect.Gravatar bungeman@google.com2014-03-24
| | | | | | | | R=mtklein@google.com Review URL: https://codereview.chromium.org/210283002 git-svn-id: http://skia.googlecode.com/svn/trunk@13917 2bbb7eff-a529-9590-31e7-b0007b416f81
* A remotable font management interface and DirectWrite implementation.Gravatar bungeman@google.com2014-03-21
The introduced SkRemotableFontMgr is a font management interface designed for simple and fast proxy support. SkFontMgr_Indirect bridges a SkRemotableFontMgr and a local SkFontMgr to present a SkFontMgr interface. This change is to be followed by https://codereview.chromium.org/132113015/ and https://codereview.chromium.org/206693003 . R=reed@google.com Review URL: https://codereview.chromium.org/206683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13897 2bbb7eff-a529-9590-31e7-b0007b416f81