Index: src/gpu/GrDrawingManager.h |
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h |
index 745820f439b62ff2db98a3e9d5edb4c194faba8b..5faf747f3297fa2d79f37194644e66b7c0b5938c 100644 |
--- a/src/gpu/GrDrawingManager.h |
+++ b/src/gpu/GrDrawingManager.h |
@@ -13,6 +13,7 @@ |
#include "GrBatchFlushState.h" |
#include "GrPathRendererChain.h" |
#include "GrPathRenderer.h" |
+#include "GrResourceCache.h" |
#include "SkTDArray.h" |
class GrContext; |
@@ -49,6 +50,12 @@ public: |
GrPathRendererChain::DrawType drawType, |
GrPathRenderer::StencilSupport* stencilSupport = NULL); |
+ void flushIfNecessary() { |
robertphillips
2016/09/02 16:23:06
What happened to "this->caps()->immediateFlush()"
|
+ if (fContext->getResourceCache()->requestsFlush()) { |
+ this->internalFlush(GrResourceCache::kCacheRequested); |
+ } |
+ } |
+ |
static bool ProgramUnitTest(GrContext* context, int maxStages); |
private: |
@@ -68,8 +75,8 @@ private: |
void abandon(); |
void cleanup(); |
void reset(); |
- /** Returns true if there was anything to flush and false otherwise */ |
- bool flush(); |
+ void flush() { this->internalFlush(GrResourceCache::FlushType::kExternal); } |
+ void internalFlush(GrResourceCache::FlushType); |
friend class GrContext; // for access to: ctor, abandon, reset & flush |