aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-01-31 13:50:44 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-02 12:49:17 +0000
commit6f6961ebad65c582318564b3688e78e5c99f3935 (patch)
tree7144abfca88062d39092c567a006b6787297a50b /tests
parent351b045a5e2cbfe41abf4296f9a984ea9ac307e8 (diff)
make GR_TEST_UTILS=0 work
Change-Id: Icce35140ca08b65217b32e6b1ffc6ad2f38ab37f Reviewed-on: https://skia-review.googlesource.com/7840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GLProgramsTest.cpp8
-rw-r--r--tests/ProcessorTest.cpp7
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index e6d738dd59..19f190e8dc 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -93,9 +93,11 @@ private:
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(BigKeyProcessor);
+#if GR_TEST_UTILS
sk_sp<GrFragmentProcessor> BigKeyProcessor::TestCreate(GrProcessorTestData*) {
return BigKeyProcessor::Make();
}
+#endif
//////////////////////////////////////////////////////////////////////////////
@@ -164,6 +166,7 @@ static sk_sp<GrRenderTargetContext> random_render_target_context(GrContext* cont
return renderTargetContext;
}
+#if GR_TEST_UTILS
static void set_random_xpf(GrPaint* paint, GrProcessorTestData* d) {
paint->setXPFactory(GrXPFactoryTestFactory::Get(d));
}
@@ -281,7 +284,11 @@ static const GrUserStencilSettings* get_random_stencil(SkRandom* random) {
return &kDoesNotWriteStencil;
}
}
+#endif
+#if !GR_TEST_UTILS
+bool GrDrawingManager::ProgramUnitTest(GrContext*, int) { return true; }
+#else
bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
GrDrawingManager* drawingManager = context->contextPriv().drawingManager();
@@ -378,6 +385,7 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
return true;
}
+#endif
static int get_glprograms_max_stages(GrContext* context) {
GrGLGpu* gpu = static_cast<GrGLGpu*>(context->getGpu());
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index ff31e49619..a23b40ab88 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -244,6 +244,7 @@ static GrColor texel_color(int i, int j) {
static GrColor4f texel_color4f(int i, int j) { return GrColor4f::FromGrColor(texel_color(i, j)); }
+#if GR_TEST_UTILS
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, reporter, ctxInfo) {
// This tests code under development but not used in skia lib. Leaving this disabled until
// some platform-specific issues are addressed.
@@ -370,6 +371,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, reporter
}
}
}
-#endif
-
-#endif
+#endif // GR_TEST_UTILS
+#endif // SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
+#endif // SK_SUPPORT_GPU