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

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

Issue 1413673002: Remove DrawingMgr shims from GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove abandon, reset & flush from public DrawingMgr API Created 5 years, 2 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
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 "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 plot; 461 plot;
462 plot = iter.prev()) { 462 plot = iter.prev()) {
463 SkASSERT(0 == fPlotLocks[plot->id()]); 463 SkASSERT(0 == fPlotLocks[plot->id()]);
464 464
465 this->purgePlot(plot); 465 this->purgePlot(plot);
466 } 466 }
467 467
468 SkASSERT(0 == fPictureHash.count()); 468 SkASSERT(0 == fPictureHash.count());
469 469
470 SkAutoTUnref<GrDrawContext> drawContext( 470 SkAutoTUnref<GrDrawContext> drawContext(
471 fContext->drawContext(fAtlas->getTexture()->asRe nderTarget())); 471 fContext->drawingMgr().drawContext(fAtlas->getTexture()->a sRenderTarget()));
472 472
473 if (drawContext) { 473 if (drawContext) {
474 drawContext->discard(); 474 drawContext->discard();
475 } 475 }
476 } 476 }
477 #endif 477 #endif
478 478
479 void GrLayerCache::processDeletedPictures() { 479 void GrLayerCache::processDeletedPictures() {
480 SkTArray<SkPicture::DeletionMessage> deletedPictures; 480 SkTArray<SkPicture::DeletionMessage> deletedPictures;
481 fPictDeletionInbox.poll(&deletedPictures); 481 fPictDeletionInbox.poll(&deletedPictures);
(...skipping 28 matching lines...) Expand all
510 fileName.appendf("\\%d", layer->fKey.pictureID()); 510 fileName.appendf("\\%d", layer->fKey.pictureID());
511 for (int i = 0; i < layer->fKey.keySize(); ++i) { 511 for (int i = 0; i < layer->fKey.keySize(); ++i) {
512 fileName.appendf("-%d", layer->fKey.key()[i]); 512 fileName.appendf("-%d", layer->fKey.key()[i]);
513 } 513 }
514 fileName.appendf(".png"); 514 fileName.appendf(".png");
515 515
516 layer->texture()->surfacePriv().savePixels(fileName.c_str()); 516 layer->texture()->surfacePriv().savePixels(fileName.c_str());
517 } 517 }
518 } 518 }
519 #endif 519 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698