Chromium Code Reviews| Index: src/gpu/GrTest.cpp |
| diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp |
| index 2a2dc955101fd380fbb50fd5bc7ca90edc3c6aba..617f9dc97460912ec13b094fec818c3b165080b1 100644 |
| --- a/src/gpu/GrTest.cpp |
| +++ b/src/gpu/GrTest.cpp |
| @@ -251,6 +251,23 @@ void GrResourceCache::dumpStatsKeyValuePairs(SkTArray<SkString>* keys, |
| void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newTimestamp; } |
| /////////////////////////////////////////////////////////////////////////////// |
| + |
| +#define ASSERT_SINGLE_OWNER \ |
| + SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);) |
| +#define RETURN_IF_ABANDONED if (fDrawingManager->abandoned()) { return; } |
| + |
| +void GrDrawContext::internal_drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch) { |
| + ASSERT_SINGLE_OWNER |
| + RETURN_IF_ABANDONED |
| + SkDEBUGCODE(this->validate();) |
|
robertphillips
2016/01/12 20:56:33
I think we still want to get a test target in here
|
| + |
| + this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); |
| +} |
| + |
| +#undef ASSERT_SINGLE_OWNER |
| +#undef RETURN_IF_ABANDONED |
| + |
| +/////////////////////////////////////////////////////////////////////////////// |
| // Code for the mock context. It's built on a mock GrGpu class that does nothing. |
| //// |