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

Unified Diff: src/gpu/GrProcessorUnitTest.cpp

Issue 1334273003: Add helper for creating leaf FPs inside GrFP::TestCreate functions (Closed) Base URL: https://skia.googlesource.com/skia.git@noinputtest
Patch Set: address comment Created 5 years, 3 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 | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrExtractAlphaFragmentProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessorUnitTest.cpp
diff --git a/src/gpu/GrProcessorUnitTest.cpp b/src/gpu/GrProcessorUnitTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bdc602c9bfe9feee8ba60ea4961c8dcad44afed9
--- /dev/null
+++ b/src/gpu/GrProcessorUnitTest.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrProcessorUnitTest.h"
+#include "GrFragmentProcessor.h"
+
+const GrFragmentProcessor* GrProcessorUnitTest::CreateChildFP(GrProcessorTestData* data) {
+#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
+ SkAutoTUnref<const GrFragmentProcessor> fp;
+ do {
+ fp.reset(GrProcessorTestFactory<GrFragmentProcessor>::Create(data));
+ SkASSERT(fp);
+ } while (fp->numChildProcessors() != 0);
+ return SkRef(fp.get());
+#else
+ SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
+ return nullptr;
+#endif
+}
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrExtractAlphaFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698