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

Side by Side Diff: src/gpu/GrContext.cpp

Issue 879963003: Fix GPU resource cache related assertions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « include/gpu/GrResourceKey.h ('k') | src/gpu/GrResourceCache2.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 break; 495 break;
496 } 496 }
497 497
498 } while (true); 498 } while (true);
499 499
500 desc.writable()->fFlags = origFlags; 500 desc.writable()->fFlags = origFlags;
501 } 501 }
502 502
503 GrTexture* texture = fGpu->createTexture(*desc, true, NULL, 0); 503 GrTexture* texture = fGpu->createTexture(*desc, true, NULL, 0);
504 #ifdef SK_DEBUG 504 #ifdef SK_DEBUG
505 GrScratchKey key; 505 if (fGpu->caps()->reuseScratchTextures() || (desc->fFlags & kRenderTarget_Gr SurfaceFlag)) {
506 GrTexturePriv::ComputeScratchKey(*desc, &key); 506 GrScratchKey key;
507 SkASSERT(NULL == texture || texture->cacheAccess().getScratchKey() == key); 507 GrTexturePriv::ComputeScratchKey(*desc, &key);
508 SkASSERT(NULL == texture || texture->cacheAccess().getScratchKey() == ke y);
509 }
508 #endif 510 #endif
509 return texture; 511 return texture;
510 } 512 }
511 513
512 void GrContext::OverBudgetCB(void* data) { 514 void GrContext::OverBudgetCB(void* data) {
513 SkASSERT(data); 515 SkASSERT(data);
514 516
515 GrContext* context = reinterpret_cast<GrContext*>(data); 517 GrContext* context = reinterpret_cast<GrContext*>(data);
516 518
517 // Flush the InOrderDrawBuffer to possibly free up some textures 519 // Flush the InOrderDrawBuffer to possibly free up some textures
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 fResourceCache2->printStats(); 1795 fResourceCache2->printStats();
1794 } 1796 }
1795 #endif 1797 #endif
1796 1798
1797 #if GR_GPU_STATS 1799 #if GR_GPU_STATS
1798 const GrContext::GPUStats* GrContext::gpuStats() const { 1800 const GrContext::GPUStats* GrContext::gpuStats() const {
1799 return fGpu->gpuStats(); 1801 return fGpu->gpuStats();
1800 } 1802 }
1801 #endif 1803 #endif
1802 1804
OLDNEW
« no previous file with comments | « include/gpu/GrResourceKey.h ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698