diff options
author | joshualitt <joshualitt@chromium.org> | 2016-01-13 07:47:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-13 07:47:38 -0800 |
commit | f5883a6d75a18c581507214d3057b5c721ed1ffc (patch) | |
tree | f9921193781c157919a5defe0de531ddb36b3c2e /src | |
parent | bc90735170b5d85a19b24df0baa865f7cf87d348 (diff) |
Hide drawBatch on GrDrawTarget from test Methods
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574383002
Review URL: https://codereview.chromium.org/1574383002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrTest.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp index 2a2dc95510..b83d67f39e 100644 --- a/src/gpu/GrTest.cpp +++ b/src/gpu/GrTest.cpp @@ -251,6 +251,24 @@ 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(const GrPipelineBuilder& pipelineBuilder, + GrDrawBatch* batch) { + ASSERT_SINGLE_OWNER + RETURN_IF_ABANDONED + SkDEBUGCODE(this->validate();) + + 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. //// |