/* * Copyright 2008 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/base/SkMathPriv.h" #include "include/private/base/SkAssert.h" #include <cstdint> /////////////////////////////////////////////////////////////////////////////// /* www.worldserver.com/turk/computergraphics/FixedSqrt.pdf */ int32_t SkSqrtBits(int32_t x, int count) { … } // Kernighan's method int SkPopCount_portable(uint32_t n) { … } // Here we strip off the unwanted bits and then return the number of trailing zero bits int SkNthSet(uint32_t target, int n) { … }