aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FitsInTest.cpp
Commit message (Collapse)AuthorAge
* Reland "simplify SkTFitsIn, try 2"Gravatar Mike Klein2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 009f51e43fee199a579ecdd773e3aa35aaa3b8b8 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>
* Revert "simplify SkTFitsIn, try 2"Gravatar Mike Klein2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 009f51e43fee199a579ecdd773e3aa35aaa3b8b8. 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>
* simplify SkTFitsIn, try 2Gravatar Mike Klein2018-06-13
| | | | | | | | | | | | | | | | 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>
* Revert "simplify SkTFitsIn"Gravatar Mike Klein2018-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b82c3d6ff2ac62c8a14b38b0d658a51e7d8cf81e. 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>
* simplify SkTFitsInGravatar Mike Klein2018-06-12
| | | | | | | | | | | | 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>
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from tests.Gravatar commit-bot@chromium.org2013-10-12
| | | | | | | | | | | | | | Skia code prefers static over unnamed namespace. BUG=None TEST=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/26962002 git-svn-id: http://skia.googlecode.com/svn/trunk@11747 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix trivial matrix computationGravatar humper@google.com2013-07-14
| | | | | | | | | | | | | | Revert "Reverted 10056-10059" This reverts commit bab4ebcaa7270c3b866a8e10917c39b055ebd51a. Fix broken GM test, reintroduce image scaling. BUG= Review URL: https://codereview.chromium.org/18721006 git-svn-id: http://skia.googlecode.com/svn/trunk@10066 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverted 10056-10059Gravatar robertphillips@google.com2013-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10059 2bbb7eff-a529-9590-31e7-b0007b416f81
* R=mtklein@google.comGravatar bungeman@google.com2013-07-12
Review URL: https://codereview.chromium.org/18503009 git-svn-id: http://skia.googlecode.com/svn/trunk@10050 2bbb7eff-a529-9590-31e7-b0007b416f81