Add SkBudgeted parameter to SkImage::makeTextureImage().

Also strengthens/adds some guarantees about this function:
* Always returns the same image if the original is texture-backed and
compatible with GrMipMapped (WRT HW MIP support)
* If a new texture backed image is returned it is always an uncached
texture that is not shared with another image or owned by an image
generator.

Adds a GrImageTexGenPolicy that allows control through image/bitmap
GrTextureProducers of whether a new texture must be made and whether
that texture should be budgeted or not.

Increases unit test coverage of this API.

Bug: skia:8669

Change-Id: Ifc0681856114a08fc8cfc57ca83d22efb1c1f166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274938
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index ff71aa7..45a5813 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -152,8 +152,8 @@
             SkIPoint origin = SkIPoint::Make(0,0);
             SkImageInfo imageInfo = SkImageInfo::Make(kSize, kSize, kRGBA_8888_SkColorType,
                                                       kPremul_SkAlphaType);
-            GrSurfaceProxyView genView =
-                    imageGen->generateTexture(context, imageInfo, origin, requestMipMapped);
+            GrSurfaceProxyView genView = imageGen->generateTexture(
+                    context, imageInfo, origin, requestMipMapped, GrImageTexGenPolicy::kDraw);
             GrSurfaceProxy* genProxy = genView.proxy();
 
             REPORTER_ASSERT(reporter, genProxy);