Move npot resizing out of GrContext and simplify GrContext texture functions.

Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54

Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0

Review URL: https://codereview.chromium.org/882223003
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index 4c76b68..e09a2c7 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -220,6 +220,7 @@
         Builder(GrContentKey* key, const GrContentKey& innerKey, Domain domain,
                 int extraData32Cnt)
             : INHERITED::Builder(key, domain, Data32CntForInnerKey(innerKey) + extraData32Cnt) {
+            SkASSERT(&innerKey != key);
             // add the inner key to the end of the key so that op[] can be indexed normally.
             uint32_t* innerKeyData = &this->operator[](extraData32Cnt);
             const uint32_t* srcData = innerKey.data();