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

Unified Diff: src/gpu/GrLayerCache.cpp

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrOvalRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.cpp
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
index aea1c9b30f9f737dbc7a3b82dc2cfbddf688c958..a023e6536e1faa59c2e4b0c0200f38b28bf48429 100644
--- a/src/gpu/GrLayerCache.cpp
+++ b/src/gpu/GrLayerCache.cpp
@@ -6,6 +6,7 @@
*/
#include "GrAtlas.h"
+#include "GrDrawContext.h"
#include "GrGpu.h"
#include "GrLayerCache.h"
#include "GrSurfacePriv.h"
@@ -465,7 +466,11 @@ void GrLayerCache::purgeAll() {
SkASSERT(0 == fPictureHash.count());
- fContext->discardRenderTarget(fAtlas->getTexture()->asRenderTarget());
+ GrDrawContext* drawContext = fContext->drawContext();
+
+ if (drawContext) {
+ drawContext->discard(fAtlas->getTexture()->asRenderTarget());
+ }
}
#endif
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrOvalRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698