diff options
author | msarett <msarett@google.com> | 2016-07-11 14:57:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-11 14:57:26 -0700 |
commit | afb8539f62b3e92dcc5dbe0598605f4058a1e03a (patch) | |
tree | 927ec4e6f072f8f74bb5064d6f23048224ce748e /include/core/SkRect.h | |
parent | bed41afa5f663a6c42f9d4e3f42c46a148f5d44a (diff) |
Revert of try to speed-up maprect + round2i + contains (patchset #8 id:140001 of https://codereview.chromium.org/2133413002/ )
Reason for revert:
Breaking the roll...
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/253294/steps/compile%20%28with%20patch%29/logs/stdio
Original issue's description:
> try to speed-up maprect + round2i + contains
>
> We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well.
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002
> CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/b42b785d1cbc98bd34aceae338060831b974f9c5
TBR=mtklein@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2136343002
Diffstat (limited to 'include/core/SkRect.h')
-rw-r--r-- | include/core/SkRect.h | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h index c71d71259b..39cbb330f8 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -10,7 +10,6 @@ #include "SkPoint.h" #include "SkSize.h" -#include "../private/SkNx.h" struct SkRect; @@ -870,28 +869,7 @@ public: this->roundOut(&ir); return ir; } - - /** - * Round the rect's values and return the result as a new SkIRect. - * This follows the same semantics as SkScalarRoundToInt(). - */ - SkIRect round2i() const { - SkIRect dst; - Sk4s rd = (Sk4s::Load(&fLeft) + Sk4s(0.5)).floor(); - SkNx_cast<int32_t>(rd).store(&dst.fLeft); - return dst; - } - - /** - * Round the rect's values and return the result as a new SkRect. - * This follows the same semantics as SkScalarRoundToScalar(). - */ - SkRect round2s() const { - SkRect dst; - (Sk4s::Load(&fLeft) + Sk4s(0.5)).floor().store(&dst.fLeft); - return dst; - } - + /** * Swap top/bottom or left/right if there are flipped (i.e. if width() * or height() would have returned a negative value.) This should be called |