Add new GrContext::updateBackendTexture call that takes an SkColorType.

Change-Id: Iba71698f52eba3e7a99e0712a51ce48953b995db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304601
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/tests/BackendAllocationTest.cpp b/tests/BackendAllocationTest.cpp
index 4541640..667bdea 100644
--- a/tests/BackendAllocationTest.cpp
+++ b/tests/BackendAllocationTest.cpp
@@ -357,12 +357,8 @@
 
     SkColor4f newColor = {color.fB , color.fR, color.fG, color.fA };
 
-    // Reupload the new data and make sure everything still works. We test with an SkColorType so
-    // we may actually swizzle the input during the create path. The update does not do any swizzle
-    // of the passed in color. So we manually do it here so we get the same expected results.
-    SkColor4f swizzledColor = dContext->priv().caps()->getWriteSwizzle(
-            backendTex.getBackendFormat(), grColorType).applyTo(newColor);
-    dContext->updateBackendTexture(backendTex, swizzledColor, mark_signaled, finishedBECreate);
+    dContext->updateBackendTexture(backendTex, skColorType, newColor, mark_signaled,
+                                   finishedBECreate);
 
     checkBackendTexture(newColor);