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>
* 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>
This reverts commit 5d052dac3a.
Reason for revert: BREAKS CHROMIUM ROLL.
https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc?l=49
| FAILED: obj/third_party/blink/renderer/platform/platform/font_platform_data_win.obj
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(49,29):
| error: no member named 'kLCDRenderText_Flag' in 'SkPaint'
| if (text_flags & SkPaint::kLCDRenderText_Flag) {
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(51,36):
| error: no member named 'kAntiAlias_Flag' in 'SkPaint'
| } else if (text_flags & SkPaint::kAntiAlias_Flag) {
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(56,52):
| error: no member named 'kSubpixelText_Flag' in 'SkPaint'
| font->setSubpixel(SkToBool(text_flags & SkPaint::kSubpixelText_Flag));
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(64,29):
| error: no member named 'kAntiAlias_Flag' in 'SkPaint'
| if (text_flags & SkPaint::kAntiAlias_Flag)
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(85,27):
| error: no member named 'kAntiAlias_Flag' in 'SkPaint'
| ? SkPaint::kAntiAlias_Flag
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(91,35):
| error: no member named 'kLCDRenderText_Flag' in 'SkPaint'
| ? SkPaint::kLCDRenderText_Flag
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(93,27):
| error: no member named 'kAntiAlias_Flag' in 'SkPaint'
| text_flags = SkPaint::kAntiAlias_Flag | lcd_flag;
| ~~~~~~~~~^
| ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(101,28):
| error: no member named 'kAntiAlias_Flag' in 'SkPaint'
| text_flags |= SkPaint::kAntiAlias_Flag;
| ~~~~~~~~~^
| 8 errors generated.
Original change's description:
> hide hinting and flag enums with PAINT_FLAGS
>
> A preflight for https://skia-review.googlesource.com/c/skia/+/185460
>
> Bug: skia:2664
> Change-Id: I83f7f9cd500e8507b559462835477ba8ae7c11ab
> Reviewed-on: https://skia-review.googlesource.com/c/185540
> 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: I4d1581a7e29267ad459ed31d4885b823fa00066f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:2664
Reviewed-on: https://skia-review.googlesource.com/c/185680
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
All of this extra code/parameter-passing for fonts to the paint unflattener
can go away when we can drop support for older skps
Bug: skia:
Change-Id: I4d626f0925a54564b7c386ed80953a0291c8bc1a
Reviewed-on: https://skia-review.googlesource.com/c/183863
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This is slightly preemptive, since paint still has getters/setters for
these fields, but skia no longer looks at them, so...
Reduces serial size by 20-bytes + size of a typeface
Bug: skia:2664
Change-Id: If1997c823db5b3d83b04cb7e1bc1d6787795b70a
Reviewed-on: https://skia-review.googlesource.com/c/181174
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
It *seems* that chrome only ever uses glyphs, so I hope we can skip the encoding parameter.
Bug: skia:
Change-Id: I3b6857ba6a37050a9fd0913a16b980bc45d54bda
Reviewed-on: https://skia-review.googlesource.com/c/170341
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 6bd19df9fa.
Restores original CL, but adds guards for flutter.
Bug: skia:
Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
Reviewed-on: https://skia-review.googlesource.com/c/169345
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Change-Id: Ieac05047826b1fb80950d65573d38494a1a5c5e7
Reviewed-on: https://skia-review.googlesource.com/148383
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Create new header and namespace, `SkUTF` where we are putting all of our
robust, well documented UTF-8, UTF-16, and UTF-32 functions:
`SkUTF::{Count,Next,To}UTF{8,16,32}()`.
SkUTF.h and SkUTF.cpp do not depend on the rest of Skia and are suitable
for re-use in other modules.
Some of the old UTF-{8,16} functions still live in SkUtils.h; their use
will be phased out in future CLs.
Also added more unit testing and cleaned up old tests.
Removed functions that were unused outside of tests or used only once.
Change-Id: Iaa59b8705abccf9c4ba082f855da368a0bad8380
Reviewed-on: https://skia-review.googlesource.com/143306
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This reverts commit 2a2f675926.
Reason for revert: this appears to be what is holding up the Chrome roll.
Original change's description:
> SkTypes: extract SkTo
>
> Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> Reviewed-on: https://skia-review.googlesource.com/133620
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,halcanary@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae
Reviewed-on: https://skia-review.googlesource.com/134504
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
SkPaint flatten and unflatten rely
on interfaces that are not public,
SkReadBuffer and SkWriteBuffer.
R=reed@google.com
Bug: skia:6172
Change-Id: I487af9f8931c78daf763c51d9e0d3ff8ff440b22
Reviewed-on: https://skia-review.googlesource.com/112561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).
* SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h
* "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"
Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'"
This reverts commit c456b73fef.
Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab
Reviewed-on: https://skia-review.googlesource.com/6886
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).
* SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h
* "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"
Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
Reviewed-on: https://skia-review.googlesource.com/4543
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>