Move GrProtected off GrSurfaceDesc and pass separately.


Change-Id: If628c13bb0e5aa885e4249a37432ba572e65d920
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228440
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 27a1941..c870799 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -88,6 +88,7 @@
      * @param desc           describes the texture to be created.
      * @param renderable     should the resulting texture be renderable
      * @param budgeted       does this texture count against the resource cache budget?
+     * @param isProtected    should the texture be created as protected.
      * @param texels         array of mipmap levels containing texel data to load.
      *                       If level i has pixels then it is assumed that its dimensions are
      *                       max(1, floor(desc.fWidth / 2)) by max(1, floor(desc.fHeight / 2)).
@@ -105,12 +106,13 @@
      * @return  The texture object if successful, otherwise nullptr.
      */
     sk_sp<GrTexture> createTexture(const GrSurfaceDesc& desc, GrRenderable renderable, SkBudgeted,
-                                   const GrMipLevel texels[], int mipLevelCount);
+                                   GrProtected isProtected, const GrMipLevel texels[],
+                                   int mipLevelCount);
 
     /**
      * Simplified createTexture() interface for when there is no initial texel data to upload.
      */
-    sk_sp<GrTexture> createTexture(const GrSurfaceDesc&, GrRenderable, SkBudgeted);
+    sk_sp<GrTexture> createTexture(const GrSurfaceDesc&, GrRenderable, SkBudgeted, GrProtected);
 
     sk_sp<GrTexture> createCompressedTexture(int width, int height, SkImage::CompressionType,
                                              SkBudgeted, const void* data, size_t dataSize);
@@ -526,8 +528,8 @@
     // overridden by backend-specific derived class to create objects.
     // Texture size and sample size will have already been validated in base class before
     // onCreateTexture is called.
-    virtual sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc&, GrRenderable renderable,
-                                             SkBudgeted, const GrMipLevel texels[],
+    virtual sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc&, GrRenderable, SkBudgeted,
+                                             GrProtected, const GrMipLevel[],
                                              int mipLevelCount) = 0;
     virtual sk_sp<GrTexture> onCreateCompressedTexture(int width, int height,
                                                        SkImage::CompressionType, SkBudgeted,