Remove ImmediateFlush mode

Change-Id: I7db113e66d81516b2beb5eefeddf488d9bfed2e5
Reviewed-on: https://skia-review.googlesource.com/18488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2017-06-02 12:43:04 -04:00 committed by Skia Commit-Bot
parent bc712740bd
commit 3ea1798829
8 changed files with 3 additions and 22 deletions

View File

@ -1307,12 +1307,10 @@ GPUSink::GPUSink(GrContextFactory::ContextType ct,
, fColorSpace(std::move(colorSpace))
, fThreaded(threaded) {}
DEFINE_bool(imm, false, "Run gpu configs in immediate mode.");
DEFINE_bool(drawOpClip, false, "Clip each GrDrawOp to its device bounds for testing.");
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const {
GrContextOptions grOptions;
grOptions.fImmediateMode = FLAGS_imm;
src.modifyGrContextOptions(&grOptions);

View File

@ -165,8 +165,6 @@ public:
bool suppressPrints() const { return fSuppressPrints; }
bool immediateFlush() const { return fImmediateFlush; }
size_t bufferMapThreshold() const {
SkASSERT(fBufferMapThreshold >= 0);
return fBufferMapThreshold;
@ -261,7 +259,6 @@ private:
virtual void onApplyOptionsOverrides(const GrContextOptions&) {}
bool fSuppressPrints : 1;
bool fImmediateFlush : 1;
bool fWireframeMode : 1;
typedef SkRefCnt INHERITED;

View File

@ -36,10 +36,6 @@ struct GrContextOptions {
/** some gpus have problems with partial writes of the rendertarget */
bool fUseDrawInsteadOfPartialRenderTargetWrite = false;
/** The GrContext operates in immediate mode. It will issue all draws to the backend API
immediately. Intended to ease debugging. */
bool fImmediateMode = false;
/** Force us to do all swizzling manually in the shader and don't rely on extensions to do
swizzling. */
bool fUseShaderSwizzling = false;

View File

@ -70,7 +70,6 @@ GrCaps::GrCaps(const GrContextOptions& options) {
fMaxWindowRectangles = 0;
fSuppressPrints = options.fSuppressPrints;
fImmediateFlush = options.fImmediateMode;
fWireframeMode = options.fWireframeMode;
fBufferMapThreshold = options.fBufferMapThreshold;
fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartialRenderTargetWrite;

View File

@ -106,8 +106,7 @@ void GrContext::initCommon(const GrContextOptions& options) {
GrPathRendererChain::Options prcOptions;
prcOptions.fAllowPathMaskCaching = options.fAllowPathMaskCaching;
prcOptions.fGpuPathRenderers = options.fGpuPathRenderers;
fDrawingManager.reset(new GrDrawingManager(this, prcOptions,
options.fImmediateMode, &fSingleOwner));
fDrawingManager.reset(new GrDrawingManager(this, prcOptions, &fSingleOwner));
fAtlasGlyphCache = new GrAtlasGlyphCache(this, options.fGlyphCacheTextureMaximumBytes);

View File

@ -62,8 +62,6 @@ public:
void flushIfNecessary() {
if (fContext->getResourceCache()->requestsFlush()) {
this->internalFlush(nullptr, GrResourceCache::kCacheRequested);
} else if (fIsImmediateMode) {
this->internalFlush(nullptr, GrResourceCache::kImmediateMode);
}
}
@ -77,7 +75,7 @@ public:
private:
GrDrawingManager(GrContext* context,
const GrPathRendererChain::Options& optionsForPathRendererChain,
bool isImmediateMode, GrSingleOwner* singleOwner)
GrSingleOwner* singleOwner)
: fContext(context)
, fOptionsForPathRendererChain(optionsForPathRendererChain)
, fSingleOwner(singleOwner)
@ -86,8 +84,7 @@ private:
, fPathRendererChain(nullptr)
, fSoftwarePathRenderer(nullptr)
, fFlushState(context->getGpu(), context->resourceProvider())
, fFlushing(false)
, fIsImmediateMode(isImmediateMode) {
, fFlushing(false) {
}
void abandon();
@ -122,8 +119,6 @@ private:
GrOpFlushState fFlushState;
bool fFlushing;
bool fIsImmediateMode;
SkTArray<GrOnFlushCallbackObject*> fOnFlushCBObjects;
// Lazily allocated

View File

@ -684,8 +684,6 @@ uint32_t GrResourceCache::getNextTimestamp() {
void GrResourceCache::notifyFlushOccurred(FlushType type) {
switch (type) {
case FlushType::kImmediateMode:
break;
case FlushType::kCacheRequested:
SkASSERT(fRequestFlush);
fRequestFlush = false;

View File

@ -191,7 +191,6 @@ public:
enum FlushType {
kExternal,
kImmediateMode,
kCacheRequested,
};
void notifyFlushOccurred(FlushType);