quadraticPointCount, cubicPointCount: passing NaN to GrNextPow2 causes
it to assert, so detect that and return the max points per curve
instead.
Passing a zero scale to GrStyle::applyToPath() makes it assert, so
draw nothing (likely what drawing with a zero scale is going to do
anyway).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257423002
Review-Url: https://codereview.chromium.org/2257423002
Reason for revert:
speculative
Original issue's description:
> Fast path translate() in SkCanvas and SkLiteDL.
>
> This adds didTranslate() so that SkLiteDL (and other canvas recorders)
> can record the translate rather than the full concat.
>
> It also adds a case to SkMatrix::preTranslate() to fast path
> translate x translate -> translate (i.e. +=).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
>
> Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1cTBR=herb@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2264433002
I have successfully detected CRC32 instruction support on my Nexus 5x.
Use of these instructions to follow... I am not yet sure which compilers if any will give me instrinsics or let me write them in asm.
defined(__ARM_FEATURE_CRC32) should cover users like Android Framework who build with the best settings possible. cpu-features.h covers use cases like Clank and our bots.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259133002
Review-Url: https://codereview.chromium.org/2259133002
This adds didTranslate() so that SkLiteDL (and other canvas recorders)
can record the translate rather than the full concat.
It also adds a case to SkMatrix::preTranslate() to fast path
translate x translate -> translate (i.e. +=).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
Review-Url: https://codereview.chromium.org/2255283002
Android framework doesn't really use this, the largest user is Chromium.
At the moment this doesn't resolve oblique requests in a nice way, but
the existing code is somewhat close to CSS3 rules already. Instead of
adding oblique handling manually, just use the existing CSS3 style
matching.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256843003
Review-Url: https://codereview.chromium.org/2256843003
Motivation: gross code simplification, also no bitset lookups at draw time.
SkPDFFont owns its glyph useage bitset.
SkPDFSubstituteMap goes away.
SkPDFObject interface is simplified.
SkPDFDocument tracks font usage (as hash set), not glyph usage.
SkPDFFont gets a simpler constructor.
SkPDFFont has first and last glyph set in constructor, not adjusted later.
SkPDFFont implementations are simplified.
SkPDFGlyphSet is replaced with simple SkBitSet.
SkPDFFont sizes its SkBitSets based on glyph count.
SkPDFGlyphSetMap goes away.
SkBitSet is now non-copyable.
SkBitSet now how utility methods to match old SkPDFGlyphSet.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253283004
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI-Trybot,Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI-Trybot
Review-Url: https://codereview.chromium.org/2253283004
The GrTessellator fix for doubly-added edges in
https://codereview.chromium.org/2259493002/ could leave
a MonotonePoly with zero edges. This is a problem for
Poly::addEdge(), which assumes that MonotonePolys always have
at least one edge. The fix is to move the check and early-out up to
Poly::addEdge(). This should also tighten up the vertex count.
(Unfortunately, the only repro I have for this issue is very
convoluted, and requires non-landed code.)
BUG=skia:5636
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251643008
Review-Url: https://codereview.chromium.org/2251643008
Motivation: drawText can look up unicode mapping at draw time to see
if ActualText should be used after crrev.com/2084533004 lands.
For each SkTypeface, only call getAdvancedTypefaceMetrics() once per
document. Cache the result in the SkPDFCanon, indexed by SkFontID.
Also cache PDF FontDescriptors in the canon, also indexed by SkFontID
(Type1 fonts only).
Simplify PDF font lookup, map SkFontID+SkGlyphID into a uint64_t. Map
that uint64_t to SkPDFFonts. Remove SkPDFCanon::findFont(),
SkPDFCanon::addFont(), SkPDFFont::IsMatch(), and enum SkPDFFont::Match.
SkPDFFont no longer holds on to ref of SkAdvancedTypefaceMetrics.
Instead, SkPDFFont::GetFontResource() and SkPDFFont::getFontSubset()
get metrics from canon.
SkPDFFont multybite bool is now a function of type.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253993002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI-Trybot,Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI-Trybot
Review-Url: https://codereview.chromium.org/2253993002
Reason for revert:
because
Original issue's description:
> SkPDF: cache metrics once.
>
> Motivation: drawText can look up unicode mapping at draw time to see
> if ActualText should be used after crrev.com/2084533004 lands.
>
> For each SkTypeface, only call getAdvancedTypefaceMetrics() once per
> document. Cache the result in the SkPDFCanon, indexed by SkFontID.
> Also cache PDF FontDescriptors in the canon, also indexed by SkFontID
> (Type1 fonts only).
>
> Simplify PDF font lookup, map SkFontID+SkGlyphID into a uint64_t. Map
> that uint64_t to SkPDFFonts. Remove SkPDFCanon::findFont(),
> SkPDFCanon::addFont(), SkPDFFont::IsMatch(), and enum SkPDFFont::Match.
>
> SkPDFFont no longer holds on to ref of SkAdvancedTypefaceMetrics.
> Instead, SkPDFFont::GetFontResource() and SkPDFFont::getFontSubset()
> get metrics from canon.
>
> SkPDFFont multybite bool is now a function of type.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253993002
>
> Committed: https://skia.googlesource.com/skia/+/0a61270f4ba85d10659fb63a86817b435ec04c94TBR=bungeman@google.com,halcanary@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2251813006