Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: tests/ReadWriteAlphaTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ReadWriteAlphaTest.cpp
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index 1be775f8f3b892c6a93d0103b5590f57805fe0fa..64b4ef6da72ea029f829b302abd5e516bc700ded 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -33,7 +33,7 @@ static void validate_alpha_data(skiatest::Reporter* reporter, int w, int h, cons
}
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) {
unsigned char alphaData[X_SIZE * Y_SIZE];
bool match;
@@ -50,7 +50,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, context) {
// We are initializing the texture with zeros here
memset(alphaData, 0, X_SIZE * Y_SIZE);
SkAutoTUnref<GrTexture> texture(
- context->textureProvider()->createTexture(desc, SkBudgeted::kNo , alphaData, 0));
+ ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo , alphaData,
+ 0));
if (!texture) {
if (!rt) {
ERRORF(reporter, "Could not create alpha texture.");
@@ -150,7 +151,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, context) {
}
}
SkAutoTUnref<GrTexture> texture(
- context->textureProvider()->createTexture(desc, SkBudgeted::kNo, rgbaData, 0));
+ ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo,
+ rgbaData, 0));
if (!texture) {
// We always expect to be able to create a RGBA texture
if (!rt && kRGBA_8888_GrPixelConfig == desc.fConfig) {
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/RecordReplaceDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698