diff options
author | tfarina <tfarina@chromium.org> | 2014-06-06 06:35:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-06 06:35:28 -0700 |
commit | f9dae780c2c46a1f08adbbe8de2faaba091254d4 (patch) | |
tree | e27079a4a5947cbc10b6be9d85663728d7395bc3 /include | |
parent | 659988168a1a86ecf9c01c07f8345671769a0ccc (diff) |
Remove GrIsPow2 in favor of SkIsPow2.
Looks like there is no good reason to have two copies of this function
doing the same thing with different name.
BUG=None
TEST=make tests
R=bsalomon@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/318873002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrColor.h | 2 | ||||
-rw-r--r-- | include/gpu/GrTexture.h | 4 | ||||
-rw-r--r-- | include/gpu/GrTypes.h | 7 |
3 files changed, 3 insertions, 10 deletions
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h index 9f6eb1cde2..1994cc5010 100644 --- a/include/gpu/GrColor.h +++ b/include/gpu/GrColor.h @@ -106,7 +106,7 @@ enum GrColorComponentFlags { }; static inline char GrColorComponentFlagToChar(GrColorComponentFlags component) { - SkASSERT(GrIsPow2(component)); + SkASSERT(SkIsPow2(component)); switch (component) { case kR_GrColorComponentFlag: return 'r'; diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h index 0f7fe9ea2f..047bd18186 100644 --- a/include/gpu/GrTexture.h +++ b/include/gpu/GrTexture.h @@ -47,11 +47,11 @@ public: * new callsites for these functions. They are slated for removal. */ SkFixed normalizeFixedX(SkFixed x) const { - SkASSERT(GrIsPow2(fDesc.fWidth)); + SkASSERT(SkIsPow2(fDesc.fWidth)); return x >> fShiftFixedX; } SkFixed normalizeFixedY(SkFixed y) const { - SkASSERT(GrIsPow2(fDesc.fHeight)); + SkASSERT(SkIsPow2(fDesc.fHeight)); return y >> fShiftFixedY; } diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 34f4e2827d..519ad0fbca 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -151,13 +151,6 @@ static inline size_t GrSizeAlignDown(size_t x, uint32_t alignment) { /////////////////////////////////////////////////////////////////////////////// /** - * Return true if n is a power of 2 - */ -static inline bool GrIsPow2(unsigned n) { - return n && 0 == (n & (n - 1)); -} - -/** * Return the next power of 2 >= n. */ static inline uint32_t GrNextPow2(uint32_t n) { |