| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrTest.h" | 8 #include "GrTest.h" |
| 9 | 9 |
| 10 #include "GrBatchAtlas.h" | 10 #include "GrBatchAtlas.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineB
uilder, | 236 void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineB
uilder, |
| 237 GrDrawBatch* batch, | 237 GrDrawBatch* batch, |
| 238 const GrClip* clip) { | 238 const GrClip* clip) { |
| 239 ASSERT_SINGLE_OWNER | 239 ASSERT_SINGLE_OWNER |
| 240 RETURN_IF_ABANDONED | 240 RETURN_IF_ABANDONED |
| 241 SkDEBUGCODE(fDrawContext->validate();) | 241 SkDEBUGCODE(fDrawContext->validate();) |
| 242 GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testing
Only_drawBatch"); | 242 GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testing
Only_drawBatch"); |
| 243 | 243 |
| 244 if (clip) { | 244 if (clip) { |
| 245 fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, *clip, batch); | 245 fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext,
*clip, batch); |
| 246 } else { | 246 } else { |
| 247 fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, GrNoClip(), ba
tch); | 247 fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext,
GrNoClip(), batch); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 #undef ASSERT_SINGLE_OWNER | 251 #undef ASSERT_SINGLE_OWNER |
| 252 #undef RETURN_IF_ABANDONED | 252 #undef RETURN_IF_ABANDONED |
| 253 | 253 |
| 254 /////////////////////////////////////////////////////////////////////////////// | 254 /////////////////////////////////////////////////////////////////////////////// |
| 255 // Code for the mock context. It's built on a mock GrGpu class that does nothing
. | 255 // Code for the mock context. It's built on a mock GrGpu class that does nothing
. |
| 256 //// | 256 //// |
| 257 | 257 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 SkASSERT(nullptr == fGpu); | 397 SkASSERT(nullptr == fGpu); |
| 398 fGpu = new MockGpu(this, options); | 398 fGpu = new MockGpu(this, options); |
| 399 SkASSERT(fGpu); | 399 SkASSERT(fGpu); |
| 400 this->initCommon(options); | 400 this->initCommon(options); |
| 401 | 401 |
| 402 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 402 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
| 403 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 403 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
| 404 // resources in the buffer pools. | 404 // resources in the buffer pools. |
| 405 fDrawingManager->abandon(); | 405 fDrawingManager->abandon(); |
| 406 } | 406 } |
| OLD | NEW |