diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-04 16:23:58 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-04 16:23:58 +0000 |
commit | 5dbb149fda134941e5d168790127caf294d322e2 (patch) | |
tree | 9637cd1ed1e9a0c754e3923203f10d698ff7d259 /include/gpu | |
parent | 261dc569b6a53729bea6e4e7a0cf2afa980eb82d (diff) |
When cache is full delay flush until GrContext draw is finished
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/25673004
git-svn-id: http://skia.googlecode.com/svn/trunk@11613 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrContext.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 5b25fe4697..973185c320 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -877,6 +877,9 @@ private: GrIndexBufferAllocPool* fDrawBufferIBAllocPool; GrInOrderDrawBuffer* fDrawBuffer; + // Set by OverbudgetCB() to request that GrContext flush before exiting a draw. + bool fFlushToReduceCacheSize; + GrAARectRenderer* fAARectRenderer; GrOvalRenderer* fOvalRenderer; @@ -899,9 +902,10 @@ private: void setupDrawBuffer(); class AutoRestoreEffects; + class AutoCheckFlush; /// Sets the paint and returns the target to draw into. The paint can be NULL in which case the /// draw state is left unmodified. - GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects*); + GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects*, AutoCheckFlush*); void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, const SkStrokeRec& stroke); |