This is a reland of 009f51e43f
Original change's description:
> simplify SkTFitsIn, try 2
>
> Originally we wrote this in C++14 constexpr,
> but because this is used from public headers, we can't use
> C++14 yet. Now a somewhat sillier looking C++11 version.
>
> All the old tests still pass, and one new added.
> Updated the comments a bit for correctness and readability.
>
> Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
> Reviewed-on: https://skia-review.googlesource.com/134425
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I99676faac6153830538c1396a325ca1456dfb126
Reviewed-on: https://skia-review.googlesource.com/134800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 009f51e43f.
Reason for revert: unintentional header consequences in Chromium... will reland after fixing Chromium
Original change's description:
> simplify SkTFitsIn, try 2
>
> Originally we wrote this in C++14 constexpr,
> but because this is used from public headers, we can't use
> C++14 yet. Now a somewhat sillier looking C++11 version.
>
> All the old tests still pass, and one new added.
> Updated the comments a bit for correctness and readability.
>
> Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
> Reviewed-on: https://skia-review.googlesource.com/134425
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=mtklein@chromium.org,bungeman@google.com
Change-Id: Ic73f8800bd022ffea125b3b1bf138fe49c0db926
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134621
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Originally we wrote this in C++14 constexpr,
but because this is used from public headers, we can't use
C++14 yet. Now a somewhat sillier looking C++11 version.
All the old tests still pass, and one new added.
Updated the comments a bit for correctness and readability.
Change-Id: I99c01e1346c1a5a36278cc08f30538112e5259aa
Reviewed-on: https://skia-review.googlesource.com/134425
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit b82c3d6ff2.
Reason for revert: SkTFitsIn makes its way into public headers via SkTo<T>, so it cannot use C++14isms.
Original change's description:
> simplify SkTFitsIn
>
> Now that we're C++14, a constexpr SkTFitsIn() is a lot easier.
> All the old tests still pass, and one new added.
>
> Updated the comments a bit for correctness and readability.
>
> Change-Id: I0f60e32e545fe4f2fb14e66a2bf25d562dbd680f
> Reviewed-on: https://skia-review.googlesource.com/133831
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
TBR=mtklein@chromium.org,halcanary@google.com,bungeman@google.com
Change-Id: Icfb19c77b450cf3525d11225d4237f9bfa68c7fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134440
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Now that we're C++14, a constexpr SkTFitsIn() is a lot easier.
All the old tests still pass, and one new added.
Updated the comments a bit for correctness and readability.
Change-Id: I0f60e32e545fe4f2fb14e66a2bf25d562dbd680f
Reviewed-on: https://skia-review.googlesource.com/133831
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>