Selecting only graphemes that are fully inside the
[start:end) range. Hopefully, it's a temporary
solution to simplify SkParagraph vs TxtLib comparison.
Change-Id: Iebc74fb4ae20c232bfae762a04e45f0979cf6236
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322438
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
In case the default font family is not there.
Bug: skia:10701
Change-Id: Ie1155d820bfcc25870bedcd0310b0e779d55e942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316087
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Can't really cache (x, y) in the picture - it's coming from the paint
Change-Id: I4ff9abe19dcd5394b40af427dfab03e8c38fba0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315648
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
(and from the sources, too)
Change-Id: I9d8ff51c91aad4b770b1f183c04734d31252b851
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313148
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
To my surprise, this even works with homegrown smart pointers (such as
SkTLazy).
https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html
Find and remove redundant calls to smart pointer’s .get() method.
Examples:
ptr.get()->Foo() ==> ptr->Foo()
*ptr.get() ==> *ptr
*ptr->get() ==> **ptr
if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...
Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
https://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-copy-initialization.html
Finds local variable declarations that are initialized using the copy
constructor of a non-trivially-copyable type but it would suffice to
obtain a const reference.
The check is only applied if it is safe to replace the copy by a const
reference. This is the case when the variable is const qualified or when
it is only used as a const, i.e. only const methods or operators are
invoked on it, or it is used as const reference or value argument in
constructors or function calls.
Change-Id: I1261410deccd8ea64e85edec53fbd5360940e587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308759
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).
Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The majority of existing call sites were automatically updated using
clang-tidy -fix. A small handful required a manual update,
e.g. CppCodeGen.
This check is a bit lenient, and in particular will not flag cases like
`std::unique_ptr<Base>(new Derived())` which is still pretty common
throughout our codebase. This CL does not attempt to replace all the
cases that ClangTidy does not flag.
Change-Id: I5eba48ef880e25d22de80f321a68c389ba769e36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307459
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit 143646297e.
Reason for revert: Have to fix it and reland again
Original change's description:
> Revert "Attach whitespaces to the neighbor unresolved blocks"
>
> This reverts commit 131c5ad6f1.
>
> Reason for revert: Blocking the G3 roll
>
> Original change's description:
> > Attach whitespaces to the neighbor unresolved blocks
> >
> > Fix the situation when an unresolved {arabic} text is broken into
> > many small runs by resolved english spaces.
> >
> > Bug: skia:10487
> > Change-Id: I3a739501c0fb7e0fc845e68392e1d214df9302db
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304000
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
>
> TBR=bungeman@google.com,jlavrova@google.com
>
> Change-Id: Iaa338dd5fb5c9962df2ee32bafbc089da0e2b8a1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10487
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305797
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bungeman@google.com,robertphillips@google.com,jlavrova@google.com
Bug: skia:10487
Change-Id: If8a85254fd536f465d80766de0406053d90c96a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306062
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
While doing a refactor, Clang issued some warnings about having copy-
constructors without assignment operators in some TextStyle classes.
Rewrote the code to minimize custom constructor/copy/assignment methods,
favoring C++11 member initialization syntax instead.
Change-Id: I4f0361ce38d4b0ada346b0ede4fcad4e2b686d67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305959
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
These missing includes were discovered when attempting a refactor.
Change-Id: I8aad5610de2337de6e55885b5868e606c1514eaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305997
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 131c5ad6f1.
Reason for revert: Blocking the G3 roll
Original change's description:
> Attach whitespaces to the neighbor unresolved blocks
>
> Fix the situation when an unresolved {arabic} text is broken into
> many small runs by resolved english spaces.
>
> Bug: skia:10487
> Change-Id: I3a739501c0fb7e0fc845e68392e1d214df9302db
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304000
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=bungeman@google.com,jlavrova@google.com
Change-Id: Iaa338dd5fb5c9962df2ee32bafbc089da0e2b8a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10487
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305797
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Fix the situation when an unresolved {arabic} text is broken into
many small runs by resolved english spaces.
Bug: skia:10487
Change-Id: I3a739501c0fb7e0fc845e68392e1d214df9302db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304000
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: Ic44e24057b95bb014504f02a736fb4341afc8971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Dealing with it for now; should not be allowed in the first place!
Change-Id: I52141d0543d60342c45813d35264c7ee49f1e972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301298
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Rename a few variables to make existing issues apparent. Also fix
potential divide by zero.
Change-Id: I071c4958f6eb2dcb79d34b4be95f57a4bbcb7b32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298750
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Renamed all codepoints into utf16Index
Change-Id: Ie915395a56ac825637f6dbb25824cd1635a5b0a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296438
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This CL is not fully comprehensive; for instance, it does not contain
fixes for backends that don't compile on Mac. But it does resolve the
vast majority of cases that trigger -Wimplicit-fallthrough.
A few minor bugs were found and fixed, but none that were likely to
affect normal operation.
Change-Id: I43487602b0d56200ce8b42702e04f66390d82f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295916
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
It's borderline illegal to implement it there in the header with a
forward-declared SkFontData. See also cl/314969840.
Change-Id: I81e981198014cce03fa9604aada5a383a847cfeb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295640
Reviewed-by: 🤓Vy Nguyen <vyng@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>