Commit Graph

91 Commits

Author SHA1 Message Date
Kevin Lubick
a4a76f3f4f Clean up some types in SkFont
Bug: skia:
Change-Id: Ie0a3cc61f16e07619e69ff2d5dac566457572e80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201681
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-03-16 13:58:37 +00:00
Mike Reed
233fc0b03c remove unused cruft
Bug: skia:
Change-Id: I41c66d87a82afaf0835b88ee8599e6da0d2a5f58
Reviewed-on: https://skia-review.googlesource.com/c/191424
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-02-12 03:53:25 +00:00
Mike Reed
fdb876d4ee remove breakText, and all utf cache accessors
Bug: skia:
Change-Id: Ib7219e0844a4401f12f89d91eab60dbb7dda0121
Reviewed-on: https://skia-review.googlesource.com/c/188580
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-02-01 15:20:23 +00:00
Mike Reed
569dda7216 hide SkFont::containsText
Bug: skia:
Change-Id: I197addb0ea1da57083283b30e19e290cdaf8dac6
Reviewed-on: https://skia-review.googlesource.com/c/188581
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-02-01 10:54:53 +00:00
Mike Reed
88c6eb5c54 remove (dead) legacy measuretext
Bug: skia:
Change-Id: I3deed21a9e4a019f87557f751fafdcc36c95fa57
Reviewed-on: https://skia-review.googlesource.com/c/188312
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-31 22:18:12 +00:00
Mike Reed
5b257abb87 change measureText impl to first convert to glyphs
Bug: skia:
Change-Id: Icbc53688fb4e575695abf062dfe89e3b4b3bbb53
Reviewed-on: https://skia-review.googlesource.com/c/188021
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-31 18:11:52 +00:00
Mike Reed
673a048b20 hide deprecated breaktext
Bug: skia:
Change-Id: I5a2f4d96f8e0ad299cf1b4f6e87f0e0d98afde5a
Reviewed-on: https://skia-review.googlesource.com/c/188020
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-30 13:58:41 +00:00
Mike Reed
5f528e5fd8 Revert "Reland "Revert "remove legacy code for text attributes on paint"""
This reverts commit 3c03c851ad.

Modification was to copy/assign fBitfieldsUInt rather than fBitfields,
since fBitfields might be smaller, and therefore ignore some bits that
we do use in hashing, etc.

Bug: skia:
Change-Id: I5965d5d64bd22bd60f0da797fdfeeffb730588ea
Reviewed-on: https://skia-review.googlesource.com/c/187307
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-28 18:27:26 +00:00
Mike Reed
3c03c851ad Reland "Revert "remove legacy code for text attributes on paint""
This reverts commit fd0bba81c0.

Reason for revert: PaintTest.cpp:150 failing

Original change's description:
> Revert "Revert "remove legacy code for text attributes on paint""
> 
> This reverts commit fb0e2aa8fd.
> 
> Bug: skia:
> Change-Id: I16bf3c999233f7498a4d76dfbcfb26be725e88f5
> Reviewed-on: https://skia-review.googlesource.com/c/187261
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: Ic52282f36841b7402a3a5466b93ef56ecdb6f51b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/187306
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-28 15:02:08 +00:00
Mike Reed
fd0bba81c0 Revert "Revert "remove legacy code for text attributes on paint""
This reverts commit fb0e2aa8fd.

Bug: skia:
Change-Id: I16bf3c999233f7498a4d76dfbcfb26be725e88f5
Reviewed-on: https://skia-review.googlesource.com/c/187261
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-28 13:56:24 +00:00
Mike Reed
fb0e2aa8fd Revert "remove legacy code for text attributes on paint"
This reverts commit 80f4adf98f.

Reason for revert: breaking PaintTest

Original change's description:
> remove legacy code for text attributes on paint
> 
> Bug: skia:2664
> Change-Id: I09f9d1401410d7ca338d7acde5a9660921c74da9
> Reviewed-on: https://skia-review.googlesource.com/c/185460
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=bungeman@google.com,rmistry@google.com,herb@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If9bbb92d6eb064aba30cfa9069051ff60585a269
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:2664
Reviewed-on: https://skia-review.googlesource.com/c/187260
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-28 00:18:09 +00:00
Mike Reed
80f4adf98f remove legacy code for text attributes on paint
Bug: skia:2664
Change-Id: I09f9d1401410d7ca338d7acde5a9660921c74da9
Reviewed-on: https://skia-review.googlesource.com/c/185460
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-27 23:54:45 +00:00
Herb Derby
087fad7900 Add getTypefaceOrDefault and refTypefaceOrDefault
* Remove GetTypefaceOrDefault from SkPaint and SkFont
* Remove RefTypefaceOrDefault from SkPaint and SkFont

Change-Id: I04ae777142c2bdec849508b611b844418bbaedff
Reviewed-on: https://skia-review.googlesource.com/c/185781
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-23 18:52:09 +00:00
Hal Canary
6dfb111c02 Documentation: SkFont::textToGlyphs()
+ When encoding is SkTextEncoding::kUTF8, SkTextEncoding::kUTF16, or
  + SkTextEncoding::kUTF32; then each Unicode codepoint is mapped to a
  + single glyph.  This function uses the default character-to-glyph
  + mapping from the SkTypeface.  It does not perform typeface fallback for
  + characters not found in the SkTypeface.

Change-Id: I3e84f996cccaf6b31c551ad027a62600d2510bc0
Reviewed-on: https://skia-review.googlesource.com/c/184385
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-16 16:04:08 +00:00
Mike Reed
e5f9cfad7b expand flag to include all text-related paint fields
Bug: skia:
Change-Id: I8453a6d607df4902cd05c5c9bc6162feda04ef9c
Reviewed-on: https://skia-review.googlesource.com/c/182969
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-10 20:06:07 +00:00
Cary Clark
26d173fee7 fix bookmaker
Illustrations calling SkTextUtils::DrawString must pass font
as well as paint.

TBR=reed@google.com,jcgregorio@google.com

Docs-Preview: https://skia.org/?cl=181562
Bug: skia:
Change-Id: I907c1c69026d3dc40282545b492a790b2349a8a0
Reviewed-on: https://skia-review.googlesource.com/c/181562
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-07 21:06:29 +00:00
Mike Reed
0951cc212c Revert "Reland "Revert "serialize fonts instead of paints"""
This reverts commit f4dd96c6b8.

Fix: restore flattening bounds (cc_unittests fail w/o this)
     not sure why this should matter...

Bug: skia:
Change-Id: I37c532b0e5e0c7be3c4cd0d272faa7109f12a5d9
Reviewed-on: https://skia-review.googlesource.com/c/179883
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-21 21:44:52 +00:00
Mike Reed
f4dd96c6b8 Reland "Revert "serialize fonts instead of paints""
This reverts commit 9803b8f1d1.

Reason for revert: break cc/paint/oop_pixeltest.cc ?

Original change's description:
> Revert "Revert "serialize fonts instead of paints""
> 
> This reverts commit 576633cf57.
> 
> Fix: add new version to both variants of SkReadBuffer
> 
> Bug: skia:
> Change-Id: I8ba60d374860718402328398a4a09b8c97d65e33
> Reviewed-on: https://skia-review.googlesource.com/c/179845
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: Ic20b22ae305f9b22863f6f441d45457c4e565f66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/179882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-21 20:49:58 +00:00
Mike Reed
9803b8f1d1 Revert "Revert "serialize fonts instead of paints""
This reverts commit 576633cf57.

Fix: add new version to both variants of SkReadBuffer

Bug: skia:
Change-Id: I8ba60d374860718402328398a4a09b8c97d65e33
Reviewed-on: https://skia-review.googlesource.com/c/179845
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-21 16:13:57 +00:00
Mike Reed
576633cf57 Revert "serialize fonts instead of paints"
This reverts commit f1ae66bedd.

Reason for revert: need to guard for no-serialization builds (I think)

Original change's description:
> serialize fonts instead of paints
> 
> Some changes from before:
> - we don't force serializing a typeface if the field is null
> - we don't serialize the blob bounds (don't trust them)
> 
> Bug: skia:
> Change-Id: I41281b2aa63a1026de87330023346f1da5378c1f
> Reviewed-on: https://skia-review.googlesource.com/c/179735
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=bungeman@google.com,herb@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Id891198bc683b9b5e7417a30c2f7adb0bd978e30
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/179843
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-21 15:35:57 +00:00
Mike Reed
f1ae66bedd serialize fonts instead of paints
Some changes from before:
- we don't force serializing a typeface if the field is null
- we don't serialize the blob bounds (don't trust them)

Bug: skia:
Change-Id: I41281b2aa63a1026de87330023346f1da5378c1f
Reviewed-on: https://skia-review.googlesource.com/c/179735
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2018-12-21 14:59:17 +00:00
Herb Derby
e7f662b6cb Use SkFont in getOrCreateCache for RemoteGlyphCache
Change-Id: I784e85cb154be077a1ca1949d7806ac95269d8c8
Reviewed-on: https://skia-review.googlesource.com/c/178281
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-12-17 21:11:38 +00:00
Mike Reed
1d6ae2e8f5 add docs to dump()
Bug: skia:
Change-Id: Ifc99db184095070b767f7ea1dd823d8c5f019281
Reviewed-on: https://skia-review.googlesource.com/c/177886
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-16 21:27:41 +00:00
Mike Reed
ce5831e004 add paint param to measureText
Bug: skia:
Change-Id: I09ccb770ec37296e5e37b852296cead6cd23e00e
Reviewed-on: https://skia-review.googlesource.com/c/177884
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-16 20:16:53 +00:00
Mike Reed
1c949d5877 make new ctor explicit
Bug: skia:
Change-Id: I533b4cd2bacee716d29f827bf69adced125c2d04
Reviewed-on: https://skia-review.googlesource.com/c/177342
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-13 15:37:51 +00:00
Mike Reed
ea908a1fbe add simpler constructor for SkFont
Bug: skia:
Change-Id: I344574cfbba05f013c8844d1a33d680094506ad2
Reviewed-on: https://skia-review.googlesource.com/c/177079
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-13 14:06:05 +00:00
Herb Derby
58fc5d19ad Use SkFont in GPU drawing step 1
Use SkFont in most places, but save setupCache for
its own CL.

Change-Id: I2c603c03e23e132edd3e164d256a1fb753523d36
Reviewed-on: https://skia-review.googlesource.com/c/175841
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-13 03:09:52 +00:00
Herb Derby
e9da1d6b19 Funtion to say if an SkFont has anti aliasing.
This will be used in a couple of places in the glyph painter,
best they all agree.

Change-Id: I67079b000bdede437de8fdc0a09538593775ab41
Reviewed-on: https://skia-review.googlesource.com/c/177000
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2018-12-12 18:19:07 +00:00
Herbert Derby
e855b9decd Use SkFont for bitmap device rendering
Change-Id: Id392a1534e1b04baa3295e79af785e40dfd7cfb6
Reviewed-on: https://skia-review.googlesource.com/c/176227
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-12 14:44:14 +00:00
Cary Clark
4f738832a9 fix bookmaker
Add an entry in SkTextBlob_Reference.bmh for getIntercepts().
Fix spelling for patheffect -> SkPathEffect and
maskfilter -> SkMaskFilter.

TBR=reed@google.com
NOTRY=true

Bug: skia:
Change-Id: I8f03ea24eb1208ac6f4015b03b98470a4169d880
Reviewed-on: https://skia-review.googlesource.com/c/176480
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-12-11 13:47:44 +00:00
Mike Reed
a0b54cd589 add test (and fix) for glyphsToUnichars
Bug: skia:
Change-Id: I2defcea7e9a37bdd203acc4ca97fc47a7f57cd43
Reviewed-on: https://skia-review.googlesource.com/c/176221
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-10 21:11:49 +00:00
Mike Reed
4037a18e5d Revert "Convert bitmap device drawing to SkFont removing all LEGACY calls"
This reverts commit 85a216ce89.

Reason for revert: broke some svg layout tests?

https://ci.chromium.org/p/chromium/builders/luci.chromium.try/mac_chromium_rel_ng/203829

Original change's description:
> Convert bitmap device drawing to SkFont removing all LEGACY calls
> 
> Change-Id: I096042a63395f361f758306993cdbb2621937aef
> Reviewed-on: https://skia-review.googlesource.com/c/175840
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=herb@google.com,reed@google.com

Change-Id: Ia88e22d4dcbdfcba01febd7378a2f6bbda235644
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/175831
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-08 14:01:54 +00:00
Herb Derby
85a216ce89 Convert bitmap device drawing to SkFont removing all LEGACY calls
Change-Id: I096042a63395f361f758306993cdbb2621937aef
Reviewed-on: https://skia-review.googlesource.com/c/175840
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-12-07 22:01:49 +00:00
Mike Reed
4e336e33d7 Move all glyphsToUnichars to a single impl (rely on typeface)
- make it private in SkFont ('cause we hate this idea)
- remove from SkPaint as soon as we update callers

Bug: skia:8600
Change-Id: I8382b34b50b549d76ae4e849287994c4a8e1be87
Reviewed-on: https://skia-review.googlesource.com/c/175427
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-06 22:48:52 +00:00
Mike Reed
4fbdb12348 add != for SkFont
Bug: skia:
Change-Id: I8d585082ee8ded3c6b690a8a6d238cd58c520a1c
Reviewed-on: https://skia-review.googlesource.com/c/174100
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-03 20:08:11 +00:00
Mike Reed
97f3cc2085 flag to convert to SkTextEncoding
Bug: skia:
Change-Id: I9628bcabc5c6f902b79009e4f21badff3e8cca94
Reviewed-on: https://skia-review.googlesource.com/c/173980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-03 15:20:36 +00:00
Cary Clark
5b671c300d add breaktext doc skeleton
copy paragraph from paint, add empty
example to docs. Fixes bot

TBR=reed@google.com

Docs-Preview: https://skia.org/?cl=173771
Bug: skia:
Change-Id: I4a79f7f8f32f860d0390dbce44669e03bb3a281e
Reviewed-on: https://skia-review.googlesource.com/c/173771
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-12-03 10:18:06 +00:00
Mike Reed
da1b99f7f5 breakText on font
Bug: skia:
Change-Id: Iebf65b158a0b08ed8e65b77d9d0aeef8c159d5db
Reviewed-on: https://skia-review.googlesource.com/c/173770
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-03 03:49:02 +00:00
Mike Reed
37cb47685f remove SK_SUPPORT_LEGACY_NESTED_HINTINGENUM code
Bug: skia:
Change-Id: Idc44f02fab691881e1c1a409adc8641663401732
Reviewed-on: https://skia-review.googlesource.com/c/173432
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-30 03:48:01 +00:00
Cary Clark
cb6bef0ad5 Update bookmaker
- This update includes font documentation.
SkFont_Reference.bmh was generated by running:

  bookmaker -b docs -i include/core/SkFont.h -t

This creates a placeholder
for examples and additional documentation.

- More work done to exclude experimental/private
symbols.

Symbols that include "experimental_", "legacy_",
"private_", "temporary_", "deprecated_" as part
of their name (case-insensitive) are not
referenced by the on-line docs and don't need
comments.

Tables built for online only include public symbols.

- Better links for constructors, destructors, operators
- Fixed some minor public interfaces
- Removed _const crutch on operators
- Keep includes inside 100 columns

TBR=reed@google.com

Docs-Preview: https://skia.org/?cl=171900
Bug: skia:
Change-Id: I93b229c6625d800604671e05b82a14c06cb906d2
Reviewed-on: https://skia-review.googlesource.com/c/171900
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-11-29 18:17:30 +00:00
Mike Reed
c33ec9f8c4 remove legacy hinting-enum guards
Bug: skia:
Change-Id: I762fd834859fc6334b4eb36c1fad05538e873dd9
Reviewed-on: https://skia-review.googlesource.com/c/173229
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-28 20:15:03 +00:00
Mike Reed
54bf684343 Revert "Revert "migrate to passing paint/ctm for bounds""
Fix: pass real paint to FindOrCreateStrikeWithNoDeviceExclusive

This reverts commit 914d319a02.

Bug: skia:
Change-Id: I2d618a868ae57e34cba5964aadd4a365481cb4cd
Reviewed-on: https://skia-review.googlesource.com/c/172976
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-11-27 17:53:47 +00:00
Mike Reed
914d319a02 Revert "migrate to passing paint/ctm for bounds"
This reverts commit d5ed3dafb2.

Reason for revert: goofed up, passing default paint instead of real one

Original change's description:
> migrate to passing paint/ctm for bounds
> 
> Some of this is left in for migrating callers (see docs)
> 
> - want getWidths to just take widths (and no paint)
> - want getBounds to just take bounds AND paint
> - want getWidthsBounds to take it all
> 
> Bug: skia:
> Change-Id: I498cd8295b90995c45237d3cf39fc097252f485e
> Reviewed-on: https://skia-review.googlesource.com/c/172868
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: Ifa827d824f0f0ef63308e5cc1fe579b1b14df616
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/172975
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-27 16:47:03 +00:00
Mike Reed
d5ed3dafb2 migrate to passing paint/ctm for bounds
Some of this is left in for migrating callers (see docs)

- want getWidths to just take widths (and no paint)
- want getBounds to just take bounds AND paint
- want getWidthsBounds to take it all

Bug: skia:
Change-Id: I498cd8295b90995c45237d3cf39fc097252f485e
Reviewed-on: https://skia-review.googlesource.com/c/172868
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-27 02:37:28 +00:00
Cary Clark
fda7b3cfd5 minor SkFont interface edits
Add missing comments.
Fix copy/pasted comments.
Change operator== to a const function.

R=reed@google.com

Docs-Preview: https://skia.org/?cl=172866
Bug: skia:
Change-Id: I4b89204ae674f93bfaf9d86a5d09a84cc8021146
Reviewed-on: https://skia-review.googlesource.com/c/172866
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-11-26 16:32:05 +00:00
Mike Reed
2871509751 change params to getPaths callback, avoiding a xform/copy up front.
Before

  18/18  MB	1	33.1µs	33.3µs	33.4µs	34.2µs	1%	█▄▃▂▂▁▁▁▁▂	nonrendering	font-path-batch
  18/18  MB	12	43.7µs	43.8µs	43.8µs	44.1µs	0%	█▂▁▂▁▅▂▂▆▂	nonrendering	font-path-loop

After

  17/17  MB	1	10.2µs	10.3µs	10.4µs	11µs	2%	█▃▂▂▂▂▂▁▁▂	nonrendering	font-path-batch
  17/17  MB	21	23.4µs	23.4µs	23.4µs	23.4µs	0%	█▂▁▃▃▂▄▁▂▂	nonrendering	font-path-loop

Bug: skia:
Change-Id: Ib1aa886fd675326bf5936b47b0d459ba02f1681e
Reviewed-on: https://skia-review.googlesource.com/c/172743
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-25 15:32:33 +00:00
Mike Reed
c16abee8c5 impl gettextpath using SkFont
Bug: skia:
Change-Id: I23dce4ed9718e7ce2d6511e08ef350c9ee2e94b4
Reviewed-on: https://skia-review.googlesource.com/c/172645
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-11-24 18:52:59 +00:00
Mike Reed
358fcad1b8 start to hide textparams on SkPaint
Bug: skia:
Change-Id: Id73c983cc71d39fe587d355e690261627fa63aee
Reviewed-on: https://skia-review.googlesource.com/c/172643
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-23 20:54:16 +00:00
Mike Reed
2ed7820970 use SkFont in a lot of places
Bug: skia:
Change-Id: I86df3f650eb5bb0219b3251ef5f8e95403838bba
Reviewed-on: https://skia-review.googlesource.com/c/172482
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-21 20:44:03 +00:00
Cary Clark
b2f8c3eb28 font doc
Prepping SkFont.h so that docs can be generated.
Mostly copying and pasting documentation with
edits to match SkFont conventions.

Added parameter names where missing to public
functions.

In a follow-on CL bookmaker will generate the
corresponding docs/SkFont_Reference.bmh

R=reed@google.com

Bug: skia:
Change-Id: Ib413b07000b368e2ee1b9145da1fca206a07a592
Reviewed-on: https://skia-review.googlesource.com/c/171646
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-11-19 19:07:29 +00:00