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

Unified Diff: src/gpu/GrDrawingManager.h

Issue 2312123003: Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache (Closed)
Patch Set: Created 4 years, 3 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/GrDrawContext.cpp ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawingManager.h
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index bc6f7a361aef839d1ed21670c00bf0eeba55faa6..745820f439b62ff2db98a3e9d5edb4c194faba8b 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -13,7 +13,6 @@
#include "GrBatchFlushState.h"
#include "GrPathRendererChain.h"
#include "GrPathRenderer.h"
-#include "GrResourceCache.h"
#include "SkTDArray.h"
class GrContext;
@@ -50,19 +49,11 @@
GrPathRendererChain::DrawType drawType,
GrPathRenderer::StencilSupport* stencilSupport = NULL);
- void flushIfNecessary() {
- if (fContext->getResourceCache()->requestsFlush()) {
- this->internalFlush(GrResourceCache::kCacheRequested);
- } else if (fIsImmediateMode) {
- this->internalFlush(GrResourceCache::kImmediateMode);
- }
- }
-
static bool ProgramUnitTest(GrContext* context, int maxStages);
private:
GrDrawingManager(GrContext* context, const GrDrawTarget::Options& optionsForDrawTargets,
- bool isImmediateMode, GrSingleOwner* singleOwner)
+ GrSingleOwner* singleOwner)
: fContext(context)
, fOptionsForDrawTargets(optionsForDrawTargets)
, fSingleOwner(singleOwner)
@@ -77,8 +68,8 @@
void abandon();
void cleanup();
void reset();
- void flush() { this->internalFlush(GrResourceCache::FlushType::kExternal); }
- void internalFlush(GrResourceCache::FlushType);
+ /** Returns true if there was anything to flush and false otherwise */
+ bool flush();
friend class GrContext; // for access to: ctor, abandon, reset & flush
@@ -101,8 +92,6 @@
GrBatchFlushState fFlushState;
bool fFlushing;
-
- bool fIsImmediateMode;
};
#endif
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698