aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-11 15:24:47 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-11 21:11:12 +0000
commitf046e15347373c20e42b1a25ecd87cbdb84de146 (patch)
tree721efd834b9aa33011692a54d30c5770220de939 /tests/ProcessorTest.cpp
parent6ff51aedda6f3b4873c292d7e03e47ad656543f8 (diff)
Fix undefined GrIORef test method on Chrome win bot
Change-Id: Ifc3d7e285a4b1a0b370ec79963127490bd7b1a84 Reviewed-on: https://skia-review.googlesource.com/6896 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ProcessorTest.cpp')
-rw-r--r--tests/ProcessorTest.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 8b7f99b6cc..e18a163b30 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -109,11 +109,11 @@ private:
};
}
-template <typename D>
-inline void GrIORef<D>::testingOnly_getCounts(int* refCnt, int* readCnt, int* writeCnt) const {
- *refCnt = fRefCnt;
- *readCnt = fPendingReads;
- *writeCnt = fPendingWrites;
+template <typename T>
+inline void testingOnly_getIORefCnts(const T* resource, int* refCnt, int* readCnt, int* writeCnt) {
+ *refCnt = resource->fRefCnt;
+ *readCnt = resource->fPendingReads;
+ *writeCnt = resource->fPendingWrites;
}
DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) {
@@ -168,30 +168,30 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) {
}
int refCnt, readCnt, writeCnt;
- texture1->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture1.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 1 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
if (texelBufferSupport) {
- buffer->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(buffer.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 1 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
}
if (imageLoadStoreSupport) {
- texture2->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture2.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 1 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
- texture3->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture3.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 1 == writeCnt);
- texture4->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture4.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 1 == readCnt);
REPORTER_ASSERT(reporter, 1 == writeCnt);
@@ -199,30 +199,30 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) {
context->flush();
- texture1->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture1.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
if (texelBufferSupport) {
- buffer->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(buffer.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
}
if (texelBufferSupport) {
- texture2->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture2.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
- texture3->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture3.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);
- texture4->testingOnly_getCounts(&refCnt, &readCnt, &writeCnt);
+ testingOnly_getIORefCnts(texture4.get(), &refCnt, &readCnt, &writeCnt);
REPORTER_ASSERT(reporter, 1 == refCnt);
REPORTER_ASSERT(reporter, 0 == readCnt);
REPORTER_ASSERT(reporter, 0 == writeCnt);