aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-11-11 13:18:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-11 13:18:11 -0800
commitcaef3450488f98aa0bc429c4e2d8e29d6a7fece4 (patch)
tree4952b658de120e5cae3f034b73e47ef2e2671d48 /include/gpu/GrContext.h
parentdad57c8c48066a2e4b270b9f6992257f7090664c (diff)
Readd "immediate" mode
This isn't an exact replacement. The accumulated batches are now flushed at drawContext-entry-point granularity (via the AutoCheckFlush objects) rather than per batch. TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1439533003
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index c40241656d..098fdd2fe9 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -8,6 +8,7 @@
#ifndef GrContext_DEFINED
#define GrContext_DEFINED
+#include "GrCaps.h"
#include "GrClip.h"
#include "GrColor.h"
#include "GrPaint.h"
@@ -20,7 +21,6 @@
struct GrBatchAtlasConfig;
class GrBatchFontCache;
-class GrCaps;
struct GrContextOptions;
class GrDrawingManager;
class GrDrawContext;
@@ -205,7 +205,7 @@ public:
void flush(int flagsBitfield = 0);
void flushIfNecessary() {
- if (fFlushToReduceCacheSize) {
+ if (fFlushToReduceCacheSize || this->caps()->immediateFlush()) {
this->flush();
}
}
@@ -406,7 +406,7 @@ private:
bool init(GrBackend, GrBackendContext, const GrContextOptions& options);
void initMockContext();
- void initCommon(const GrContextOptions& options);
+ void initCommon();
/**
* These functions create premul <-> unpremul effects if it is possible to generate a pair