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
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 66588c4..e8ae18a 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -618,7 +618,7 @@
return false;
}
- bool isPow2 = GrIsPow2(width) && GrIsPow2(height);
+ bool isPow2 = SkIsPow2(width) && SkIsPow2(height);
if (!isPow2) {
bool tiled = NULL != params && params->isTiled();
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 36a9cf1..fd249de 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -125,10 +125,10 @@
SkASSERT((desc.fFlags & kRenderTarget_GrTextureFlagBit) == 0);
if (!this->caps()->npotTextureTileSupport() &&
- (!GrIsPow2(desc.fWidth) || !GrIsPow2(desc.fHeight))) {
+ (!SkIsPow2(desc.fWidth) || !SkIsPow2(desc.fHeight))) {
return NULL;
}
-
+
this->handleDirtyContext();
tex = this->onCreateCompressedTexture(desc, srcData);
} else {
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 20cd597..4f95730 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -172,7 +172,7 @@
GrResourceKey::ResourceFlags flags = 0;
bool tiled = NULL != params && params->isTiled();
if (tiled && !gpu->caps()->npotTextureTileSupport()) {
- if (!GrIsPow2(desc.fWidth) || !GrIsPow2(desc.fHeight)) {
+ if (!SkIsPow2(desc.fWidth) || !SkIsPow2(desc.fHeight)) {
flags |= kStretchToPOT_TextureFlag;
switch(params->filterMode()) {
case GrTextureParams::kNone_FilterMode: