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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 #endif | 242 #endif |
243 | 243 |
244 /////////////////////////////////////////////////////////////////////////////// | 244 /////////////////////////////////////////////////////////////////////////////// |
245 | 245 |
246 void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
imestamp; } | 246 void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT
imestamp; } |
247 | 247 |
248 /////////////////////////////////////////////////////////////////////////////// | 248 /////////////////////////////////////////////////////////////////////////////// |
249 | 249 |
250 #define ASSERT_SINGLE_OWNER \ | 250 #define ASSERT_SINGLE_OWNER \ |
251 SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fDrawContext->fSing
leOwner);) | 251 SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fDrawContext->fSing
leOwner);) |
252 #define RETURN_IF_ABANDONED if (fDrawContext->fDrawingManager->abandoned(
)) { return; } | 252 #define RETURN_IF_ABANDONED if (fDrawContext->fDrawingManager->wasAbandon
ed()) { return; } |
253 | 253 |
254 void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineB
uilder, | 254 void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineB
uilder, |
255 GrDrawBatch* batch, | 255 GrDrawBatch* batch, |
256 const GrClip* clip) { | 256 const GrClip* clip) { |
257 ASSERT_SINGLE_OWNER | 257 ASSERT_SINGLE_OWNER |
258 RETURN_IF_ABANDONED | 258 RETURN_IF_ABANDONED |
259 SkDEBUGCODE(fDrawContext->validate();) | 259 SkDEBUGCODE(fDrawContext->validate();) |
260 GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testing
Only_drawBatch"); | 260 GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testing
Only_drawBatch"); |
261 | 261 |
262 if (clip) { | 262 if (clip) { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 SkASSERT(nullptr == fGpu); | 415 SkASSERT(nullptr == fGpu); |
416 fGpu = new MockGpu(this, options); | 416 fGpu = new MockGpu(this, options); |
417 SkASSERT(fGpu); | 417 SkASSERT(fGpu); |
418 this->initCommon(options); | 418 this->initCommon(options); |
419 | 419 |
420 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 420 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
421 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 421 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
422 // resources in the buffer pools. | 422 // resources in the buffer pools. |
423 fDrawingManager->abandon(); | 423 fDrawingManager->abandon(); |
424 } | 424 } |
OLD | NEW |