aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-01 13:56:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-01 20:30:54 +0000
commit1bfece8556cc03b6aa904b2445d2332136bce037 (patch)
tree94ac7527f390069812bc4c35fdceaffb034097cc
parent8692b4a5acffe983c67831146abc6122ee1d4c0b (diff)
Rm int flavor of GrNextPow2 in favor of uint32_t flavor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=18384 Change-Id: I8f62c5ea6146626916389429ac4f2f80c57a7d72 Reviewed-on: https://skia-review.googlesource.com/18384 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r--src/core/SkMathPriv.h4
-rw-r--r--src/gpu/GrResourceProvider.cpp2
-rw-r--r--src/gpu/GrResourceProvider.h2
3 files changed, 2 insertions, 6 deletions
diff --git a/src/core/SkMathPriv.h b/src/core/SkMathPriv.h
index 5ef0cb25e4..ddb231507f 100644
--- a/src/core/SkMathPriv.h
+++ b/src/core/SkMathPriv.h
@@ -200,8 +200,4 @@ static inline size_t GrNextSizePow2(size_t n) {
return n + 1;
}
-static inline int GrNextPow2(int n) {
- SkASSERT(n >= 0); // this impl only works for non-neg.
- return n ? (1 << (32 - SkCLZ(n - 1))) : 1;
-}
#endif
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index 53b9b46d87..1ebd4c3566 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -27,7 +27,7 @@
GR_DECLARE_STATIC_UNIQUE_KEY(gQuadIndexBufferKey);
-const int GrResourceProvider::kMinScratchTextureSize = 16;
+const uint32_t GrResourceProvider::kMinScratchTextureSize = 16;
#define ASSERT_SINGLE_OWNER \
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);)
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 14db3e6eda..2c5e873b29 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -103,7 +103,7 @@ public:
*/
sk_sp<GrRenderTarget> wrapBackendRenderTarget(const GrBackendRenderTarget&, GrSurfaceOrigin);
- static const int kMinScratchTextureSize;
+ static const uint32_t kMinScratchTextureSize;
/**
* Either finds and refs, or creates an index buffer with a repeating pattern for drawing