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

Unified Diff: tests/GpuColorFilterTest.cpp

Issue 1448873002: Generate list of GPU contexts outside tests (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-01-gpu-test-context-support
Patch Set: make blurtest for all rendering contexts Created 5 years, 1 month 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/FloatingPointTextureTest.cpp ('k') | tests/GpuDrawPathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GpuColorFilterTest.cpp
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp
index c707380d55160df35fa3d1b30bbcbb68e36de191..830c7dfff3028f987dd8ea10e6ff0b4fed796579 100644
--- a/tests/GpuColorFilterTest.cpp
+++ b/tests/GpuColorFilterTest.cpp
@@ -12,7 +12,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "GrContextFactory.h"
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "SkGr.h"
@@ -34,7 +33,7 @@ static GrColor filterColor(const GrColor& color, uint32_t flags) {
return color & mask;
}
-static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrContext* grContext) {
+DEF_GPUTEST_FOR_ALL_CONTEXTS(GpuColorFilter, reporter, context) {
struct GetConstantComponentTestCase {
// "Shape drawn with"
uint32_t inputComponents; // "rgb of", "red of", "alpha of", ...
@@ -102,7 +101,7 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont
const GetConstantComponentTestCase& test = filterTests[i];
SkAutoTUnref<SkColorFilter> cf(
SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode));
- SkAutoTUnref<const GrFragmentProcessor> fp( cf->asFragmentProcessor(grContext));
+ SkAutoTUnref<const GrFragmentProcessor> fp( cf->asFragmentProcessor(context));
REPORTER_ASSERT(reporter, fp);
GrInvariantOutput inout(test.inputColor,
static_cast<GrColorComponentFlags>(test.inputComponents),
@@ -114,17 +113,4 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont
}
}
-DEF_GPUTEST(GpuColorFilter, reporter, factory) {
- for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
- GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
-
- GrContext* grContext = factory->get(glType);
- if (nullptr == grContext) {
- continue;
- }
-
- test_getConstantColorComponents(reporter, grContext);
- }
-}
-
#endif
« no previous file with comments | « tests/FloatingPointTextureTest.cpp ('k') | tests/GpuDrawPathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698