One signature for creating unit tests that run on premade GrContexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002
Review URL: https://codereview.chromium.org/1860593002
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 216e042..fb38c7e 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -639,7 +639,7 @@
#include "SkColorPriv.h"
/** Tests calling copyTo on a texture backed bitmap. Tests that all BGRA_8888/RGBA_8888 combinations
of src and dst work. This test should be removed when SkGrPixelRef is removed. */
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BitmapCopy_Texture, reporter, ctx) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BitmapCopy_Texture, reporter, ctxInfo) {
static const SkPMColor kData[] = {
0xFF112233, 0xAF224499,
0xEF004466, 0x80773311
@@ -667,7 +667,8 @@
const void* srcData = (kSkia8888_GrPixelConfig == desc.fConfig) ? kData : swizData;
SkAutoTUnref<GrTexture> texture(
- ctx->textureProvider()->createTexture(desc, SkBudgeted::kNo, srcData, 0));
+ ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo, srcData,
+ 0));
if (!texture) {
continue;