Commit Graph

11 Commits

Author SHA1 Message Date
Robert Phillips
385804514e Revert "Remove drawTextBlob from device use drawGlyphRunList"
This reverts commit e2e52e46ca.

Reason for revert: See if this is blocking the Chrome roll

Original change's description:
> Remove drawTextBlob from device use drawGlyphRunList
> 
> Convert all backends to use GlyphRunList instead of
> text blobs. If the device did not originally implement
> drawTextBlob it will be simulated by drawPosText on the
> device.
> 
> Other changes:
> Change to using an origin from absolulte positioning. The GPU
> code uses origin change to update blobs under translation.
> 
> Change cluster to use const uint32_t instead of just
> uint32_t.
> 
> Add SkPaint to runs.
> 
> The draw filter is hosted up to the canavas level and applied there.
> 
> Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
> Reviewed-on: https://skia-review.googlesource.com/137224
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Hal Canary <halcanary@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com,reed@google.com,khushalsagar@chromium.org,khushalsagar@google.com

Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138120
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-28 12:00:47 +00:00
Herb Derby
e2e52e46ca Remove drawTextBlob from device use drawGlyphRunList
Convert all backends to use GlyphRunList instead of
text blobs. If the device did not originally implement
drawTextBlob it will be simulated by drawPosText on the
device.

Other changes:
Change to using an origin from absolulte positioning. The GPU
code uses origin change to update blobs under translation.

Change cluster to use const uint32_t instead of just
uint32_t.

Add SkPaint to runs.

The draw filter is hosted up to the canavas level and applied there.

Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
Reviewed-on: https://skia-review.googlesource.com/137224
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-28 03:36:16 +00:00
Herb Derby
ed55419d85 Use indices into the vectors shared by runs
With multiple runs, the shared vectors were moving out from
under the pointers in earlier runs.

Change-Id: I486d2e603e18ea7effc0dbdbc7c5d3c545278703
Reviewed-on: https://skia-review.googlesource.com/137222
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-06-25 16:05:25 +00:00
Herb Derby
b9177cfaa8 Add SkGlyphRunList - v2
Extend the glyph run system with a glyph run list. This
allows the processing of text blobs.

Add original text an cluster to runs for PDF.

PS - the original had read off the end of a buffer problem.

Change-Id: I9430f0c27aaa3d9458bfe3caba5f433b72fdf84c
Reviewed-on: https://skia-review.googlesource.com/136792
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-22 15:26:17 +00:00
Herb Derby
149b541d88 Revert "Add SkGlyphRunList"
This reverts commit f2e4a039df.

Reason for revert: Breaks asan tests

Original change's description:
> Add SkGlyphRunList
> 
> Extend the glyph run system with a glyph run list. This
> allows the processing of text blobs.
> 
> Add original text an cluster to runs for PDF.
> 
> Change-Id: If4867d000e45f8975a30e982fc8fdbe104ef4332
> Reviewed-on: https://skia-review.googlesource.com/135627
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I903592714da901383efc7e5f47ce3dfd529e2aca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/136761
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-21 20:03:07 +00:00
Herb Derby
f2e4a039df Add SkGlyphRunList
Extend the glyph run system with a glyph run list. This
allows the processing of text blobs.

Add original text an cluster to runs for PDF.

Change-Id: If4867d000e45f8975a30e982fc8fdbe104ef4332
Reviewed-on: https://skia-review.googlesource.com/135627
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-21 19:11:47 +00:00
Herb Derby
59d997a6e1 New more efficient run builder
A system for building glyph runs. In the future the builder will
only live in canvas, but it's internal structures facilitate
interacting with the cache a single glyph at a time. When all
the bulk code is in place, only runs will be passed around.

Passing the builder down the text draw stack is temporary.

Change-Id: I6e3ed184b3f3a58b919377f2d31936e971bd8efa
Reviewed-on: https://skia-review.googlesource.com/132928
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-08 19:25:43 +00:00
Herb Derby
4ffa027cf6 Smarter use of glyph cache
Change-Id: Ic9bea7310b375575503042881d9d54ff13996729
Reviewed-on: https://skia-review.googlesource.com/131924
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-06-06 19:07:52 +00:00
Herb Derby
41f4f31cd7 Reland "Have draw(Text|PosText|PosTextH) use a single entry on the device"
This reverts commit 74b390d6b1.

Reason for revert: reverting to add patch for valgrind

Original change's description:
> Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
> 
> This reverts commit 4225b3220e.
> 
> Reason for revert: made valgrind unhappy.
> 
> Original change's description:
> > Have draw(Text|PosText|PosTextH) use a single entry on the device
> > 
> > Handle the positioning of drawText at the canvas layer. Simplify
> > the code by removing similar implementations.
> > 
> > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> > Reviewed-on: https://skia-review.googlesource.com/127131
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
> 
> Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/132403
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com

Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132580
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-06 17:46:05 +00:00
Hal Canary
74b390d6b1 Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
This reverts commit 4225b3220e.

Reason for revert: made valgrind unhappy.

Original change's description:
> Have draw(Text|PosText|PosTextH) use a single entry on the device
> 
> Handle the positioning of drawText at the canvas layer. Simplify
> the code by removing similar implementations.
> 
> Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> Reviewed-on: https://skia-review.googlesource.com/127131
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132403
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-06 13:29:57 +00:00
Herb Derby
4225b3220e Have draw(Text|PosText|PosTextH) use a single entry on the device
Handle the positioning of drawText at the canvas layer. Simplify
the code by removing similar implementations.

Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
Reviewed-on: https://skia-review.googlesource.com/127131
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-06-05 20:11:39 +00:00