Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: tools/gpu/GrTest.cpp

Issue 1979913002: Rename GrDrawingMgr::abandon to wasAbandoned & add a matching entry point to GrDrawingContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrPathRenderingDrawContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRenderingDrawContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698