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

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

Issue 902873002: Reimplement gpu message bus for invalidated bitmap gen IDs (Closed) Base URL: https://skia.googlesource.com/skia.git@one_tex
Patch Set: fix speeling error 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 | « src/gpu/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrResourceCache2.h » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrAtlas.h" 8 #include "GrAtlas.h"
9 #include "GrGpu.h" 9 #include "GrGpu.h"
10 #include "GrLayerCache.h" 10 #include "GrLayerCache.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 this->purgePlot(plot); 463 this->purgePlot(plot);
464 } 464 }
465 465
466 SkASSERT(0 == fPictureHash.count()); 466 SkASSERT(0 == fPictureHash.count());
467 467
468 fContext->discardRenderTarget(fAtlas->getTexture()->asRenderTarget()); 468 fContext->discardRenderTarget(fAtlas->getTexture()->asRenderTarget());
469 } 469 }
470 #endif 470 #endif
471 471
472 void GrLayerCache::processDeletedPictures() { 472 void GrLayerCache::processDeletedPictures() {
473 SkTDArray<SkPicture::DeletionMessage> deletedPictures; 473 SkTArray<SkPicture::DeletionMessage> deletedPictures;
474 fPictDeletionInbox.poll(&deletedPictures); 474 fPictDeletionInbox.poll(&deletedPictures);
475 475
476 for (int i = 0; i < deletedPictures.count(); i++) { 476 for (int i = 0; i < deletedPictures.count(); i++) {
477 this->purge(deletedPictures[i].fUniqueID); 477 this->purge(deletedPictures[i].fUniqueID);
478 } 478 }
479 } 479 }
480 480
481 #ifdef SK_DEVELOPER 481 #ifdef SK_DEVELOPER
482 void GrLayerCache::writeLayersToDisk(const SkString& dirName) { 482 void GrLayerCache::writeLayersToDisk(const SkString& dirName) {
483 483
(...skipping 19 matching lines...) Expand all
503 fileName.appendf("\\%d", layer->fKey.pictureID()); 503 fileName.appendf("\\%d", layer->fKey.pictureID());
504 for (int i = 0; i < layer->fKey.keySize(); ++i) { 504 for (int i = 0; i < layer->fKey.keySize(); ++i) {
505 fileName.appendf("-%d", layer->fKey.key()[i]); 505 fileName.appendf("-%d", layer->fKey.key()[i]);
506 } 506 }
507 fileName.appendf(".png"); 507 fileName.appendf(".png");
508 508
509 layer->texture()->surfacePriv().savePixels(fileName.c_str()); 509 layer->texture()->surfacePriv().savePixels(fileName.c_str());
510 } 510 }
511 } 511 }
512 #endif 512 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrResourceCache2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698