aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkScalerContext_win_dw.cpp
Commit message (Collapse)AuthorAge
* Clean up glyph id handling.Gravatar Ben Wagner2016-11-11
| | | | | | | | | | | | | | | | | Extract SkPackedID and its strongly typed subclasses SkPackedGlyphID and SkPackedUnicharID out of SkGlyph. This simplifies the code handling these types, as well as making it clearer that we wouuld eventually like to get away from this scheme. Changes SkScalerContext::getPath to take SkPackedGlyphID. Changes SkScalerContext::generatePath to take SkGlyphID. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4722 Change-Id: I365c0c618b7ae0d348272155fac7761a69faa920 Reviewed-on: https://skia-review.googlesource.com/4722 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* SkScalerContext to use smart pointers.Gravatar bungeman2016-10-20
| | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Change-Id: I27a714388b8ded7dfc968e322b0a587205f575f1 Reviewed-on: https://skia-review.googlesource.com/3731 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove assert that current color is never used.Gravatar bungeman2016-09-22
| | | | | | | | | | | The COLR table format allows for use of the 'current color'. Currently the code asserts if this is used, but will use a nearby luminance grey to this color instead if the assert is ignored. Remove the assert now that this path is known to be used. BUG=skia:5788 Review-Url: https://codereview.chromium.org/2359923004
* Revert of Support pixel antialising in DirectWrite. (patchset #4 id:60001 of ↵Gravatar bungeman2016-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2065833002/ ) Reason for revert: Moving to the new glyph run analysis changes things anyway, and the Chromium Win 10 bots are having issues with this. Revert until I have time to make the suppression wider. Original issue's description: > Support pixel antialising in DirectWrite. > > DirectWrite2 supports pixel antialiasing and rendering without hinting. > > BUG=skia:5416 > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2065833002 > > TBR=reed > Will move SkTScopedComPtr into src. > > Committed: https://skia.googlesource.com/skia/+/bd770d619553a88eeaa64ff29082f62db5c9b4d2 TBR=reed@google.com,mtklein@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5416 Review-Url: https://codereview.chromium.org/2075913002
* Support pixel antialising in DirectWrite.Gravatar bungeman2016-06-16
| | | | | | | | | | | | DirectWrite2 supports pixel antialiasing and rendering without hinting. BUG=skia:5416 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2065833002 TBR=reed Will move SkTScopedComPtr into src. Review-Url: https://codereview.chromium.org/2065833002
* Type-erase SkAutoMutexAcquire and SkAutoExclusive.Gravatar mtklein2016-06-10
| | | | | | | | | | This is purely for convenience, to not need to write the lock type in the guard anymore. This should all inline away. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055023003 Review-Url: https://codereview.chromium.org/2055023003
* Implement support for rendering color emoji on WindowsGravatar kulshin2016-06-01
| | | | | | | | | | | | | | This change adds support to the DirectWrite scaler context for detection of color fonts. If it detects a color font and the glyph is a color glyph, it will use DirectWrite's TranslateColorGlyphRun API and generate an image of the glyph that can then be rendered. Chromium tests: https://codereview.chromium.org/2003853002 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1984943002 Review-Url: https://codereview.chromium.org/1984943002
* Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 ↵Gravatar reed2016-04-12
| | | | | | | | | | | | | | of https://codereview.chromium.org/1863013003/ )" add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome this has now landed https://codereview.chromium.org/1878913002/ TBR= BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880873002 Review URL: https://codereview.chromium.org/1880873002
* Revert of Pass effects directly to fontcache (patchset #8 id:140001 of ↵Gravatar borenet2016-04-11
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1863013003/ ) Reason for revert: Seems to have broken the DEPS roll. Original issue's description: > Pass effects directly to fontcache > > BUG=skia:5176 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 > > Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2 TBR=djsollen@google.com,bungeman@google.com,mtklein@google.com,fmalita@chromium.org,msarett@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5176 Review URL: https://codereview.chromium.org/1872253004
* Pass effects directly to fontcacheGravatar reed2016-04-11
| | | | | | | BUG=skia:5176 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 Review URL: https://codereview.chromium.org/1863013003
* Change type of SkGlyph::fAdvance[XY] to float.Gravatar benjaminwagner2016-03-24
| | | | | | | BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737693006 Review URL: https://codereview.chromium.org/1737693006
* Start making all .cpp files compile-able on all platforms.Gravatar mtklein2015-11-02
| | | | | | | | | | | | | | | | | | | | | | | I sometimes dream to hone our build process down to something as simple as $ find src -name '*.cpp' | xargs c++ <some cflags> -c -o skia.o To start, it helps if we can compile all files on all platforms. Each non-portable file guards itself with defines provided by SkTypes.h. This does not convert all non-portable code, but it's a good representative chunk. E.g. instead of having to remember which SkDebug_*.cpp to compile on which platform we can just compile all three and let the code itself sort it out. This has the nice side effect of making non-portable code declare the conditions under which it can compile explicitly. I've been testing mostly with the CMake build as it's easiest, but this should apply equally to BUILD, Gyp, and GN files... to any build system really. BUG=skia:4269 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1411283005
* Add shared mutexes to the direct write cache code to get better parallelism.Gravatar herb2015-10-27
| | | | | | BUG=547182 Review URL: https://codereview.chromium.org/1424093002
* Use SkAutoTExclusive guard in DirectWrite port.Gravatar herb2015-10-23
| | | | Review URL: https://codereview.chromium.org/1417873005
* Add a mutex to protect the DWrite calls.Gravatar herb2015-10-21
| | | | | | BUG=skia:4479 Review URL: https://codereview.chromium.org/1421433004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Remove &glyph from SkASSERT.Gravatar dcheng2015-07-07
| | | | | | | | | | | This tickles a warning in Clang: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] BUG=none Review URL: https://codereview.chromium.org/1220113003
* Support BGR with DirectWrite.Gravatar bungeman2015-03-19
| | | | | | BUG=chromium:468509 Review URL: https://codereview.chromium.org/1018863003
* Factor text size device mapping in SkScalerContext.Gravatar bungeman2014-12-05
| | | | | | | | | | | | | All of our font back-ends use the text size in some way other than simple concatentation with the current matrix. The code here finds the full device matrix and then decomposes it to extract the text size. FreeType, GDI, and DirectWrite use the text size as the pre-hint scale. CoreText will not scale color emoji above the requested text size, and certain features like 'trak' are performed on the text size. Review URL: https://codereview.chromium.org/748883005
* remove unused kLCD_MaskFormatGravatar reed2014-11-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/728673002
* Detect presence of dwrite_1.h.Gravatar bungeman2014-09-10
| | | | | | | | | | | | | | | | | | This introduces the SK_HAS_DWRITE_1_H define which may be set at build time or will be true when WINVER_MAXVER >= 0x0602 . The dwrite_1.h header is available starting in Windows SDK 8.0. This change supports users who must still use Windows SDK 7.0. It also allows for easier local testing of the older interfaces on newer versions of Windows. See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1053652 R=george@mozilla.com, mtklein@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/552383002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Fix error handling in DirectWrite with tiny text.Gravatar bungeman2014-08-28
| | | | | | | | | | | If there is an error while trying to determine the metrics, we need to bail instead of potentially using uninitialized data. R=reed@google.com, mtklein@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/511783003
* DirectWrite to use aliased if ClearType is empty.Gravatar Ben Wagner2014-08-27
| | | | | | | | | | | | | | | | | Some CJK fonts with some versions of DirectWrite return valid data for bitmaps, but not for cleartype data. For reference, two screenshots. M37 Stable and then with this patch: http://imgur.com/9pf3rB9,EiTb6Li See https://code.google.com/p/chromium/issues/detail?id=396624#c10 for content of test html file. R=eae@chromium.org, reed@google.com, shrikant@chromium.org, bungeman@chromium.org, cpu@chromium.org BUG=chromium:407945 Review URL: https://codereview.chromium.org/504343007
* Get additional DW font metrics when available.Gravatar bungeman2014-07-23
| | | | | | | | | BUG=chromium:395043 R=eae@chromium.org, caryclark@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/412993002
* Remove vertical/horizontal metrics selection.Gravatar bungeman2014-07-07
| | | | | | | | R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/370463002
* Remove SK_IGNORE_DWRITE_RENDERING_FIX.Gravatar Ben Wagner2014-07-02
| | | | This flag is no longer defined anywhere, so remove it's use.
* DirectWrite to detect GDI only fonts.Gravatar bungeman2014-06-30
| | | | | | | | | | | | | | The exist a number of webfonts which have poor hinting which look very bad with any vertical subsampling. The fonts often rely on drop out control to avoid zero coverage in the y direction. As a result, any font with hints but no 'gasp' table is considered to be poorly hinted in this way, and will not be rendered with vertical subsampling when hinted. R=eae@chromium.org, reed@google.com, mtklein@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/363433002
* Remove unneeded return from DirectWrite.Gravatar Ben Wagner2014-06-23
|
* Better rendering detection with DirectWrite.Gravatar bungeman2014-06-23
| | | | | | | | | | | When requesting embedded bitmaps, all sizes in a gridfit gasp range with a bitmap in that range should be gridfit to the fullest extent possible. R=eae@chromium.org, reed@google.com, mtklein@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/341343002
* DirectWrite to not round already subpixel metrics.Gravatar bungeman2014-06-20
| | | | | | | | | | | | | | | | In keeping with the FreeType and Mac scaler contexts, do not artificially round already subpixel metrics. The subpixel flag should be the 'forceSubpixel' flag when it comes to metrics. Existing backends will give subpixel metrics when 'subpixel' is requested, but will not round proper metrics when 'subpixel' is not requested. R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/344253002
* Rename SkFontHost_win_dw.cpp SkScalerContext.Gravatar Ben Wagner2014-06-05
This is a continuation of https://codereview.chromium.org/314193002/ . TBR=reed@google.com Review URL: https://codereview.chromium.org/315173004