aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-09-07 10:02:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-07 10:02:04 -0700
commitb77a907c2fb4402b7e70e9fff70eb71482354e67 (patch)
tree692acfaad6a575969ceb547d617aa6bfcbc7a4d8 /include/gpu/GrContext.h
parent5edf2908a305d3365a1574a8358343bb26468b35 (diff)
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough. Removes the unused and untested discard flush variation. Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext. Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the flush that just occurred. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002 Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744 Review-Url: https://codereview.chromium.org/2307053002
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index f14c36e35c..996b77f2db 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -214,31 +214,10 @@ public:
// Misc.
/**
- * Flags that affect flush() behavior.
- */
- enum FlushBits {
- /**
- * A client may reach a point where it has partially rendered a frame
- * through a GrContext that it knows the user will never see. This flag
- * causes the flush to skip submission of deferred content to the 3D API
- * during the flush.
- */
- kDiscard_FlushBit = 0x2,
- };
-
- /**
* Call to ensure all drawing to the context has been issued to the
* underlying 3D API.
- * @param flagsBitfield flags that control the flushing behavior. See
- * FlushBits.
*/
- void flush(int flagsBitfield = 0);
-
- void flushIfNecessary() {
- if (fFlushToReduceCacheSize || this->caps()->immediateFlush()) {
- this->flush();
- }
- }
+ void flush();
/**
* These flags can be used with the read/write pixels functions below.
@@ -409,8 +388,6 @@ private:
GrBatchFontCache* fBatchFontCache;
SkAutoTDelete<GrTextBlobCache> fTextBlobCache;
- // Set by OverbudgetCB() to request that GrContext flush before exiting a draw.
- bool fFlushToReduceCacheSize;
bool fDidTestPMConversions;
int fPMToUPMConversion;
int fUPMToPMConversion;
@@ -472,12 +449,6 @@ private:
bool didFailPMUPMConversionTest() const;
/**
- * This callback allows the resource cache to callback into the GrContext
- * when the cache is still over budget after a purge.
- */
- static void OverBudgetCB(void* data);
-
- /**
* A callback similar to the above for use by the TextBlobCache
* TODO move textblob draw calls below context so we can use the call above.
*/