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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1437843002: Move GrBatchFlushState from GrDrawTarget to GrDrawingManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: readd white space Created 5 years, 1 month 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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index bfb62a8cf10b1236aef2f53be4d04a3962bd75ca..4fe0036a5ab5346d418002f1fa64c6fdd5df8575 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -8,7 +8,6 @@
#ifndef GrDrawTarget_DEFINED
#define GrDrawTarget_DEFINED
-#include "GrBatchFlushState.h"
#include "GrClip.h"
#include "GrClipMaskManager.h"
#include "GrContext.h"
@@ -44,13 +43,9 @@ class GrPathRangeDraw;
class GrDrawTarget final : public SkRefCnt {
public:
- struct Options {
- bool fImmediateMode;
- };
-
// The context may not be fully constructed and should not be used during GrDrawTarget
// construction.
- GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider*, const Options& options);
+ GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider*);
~GrDrawTarget() override;
@@ -90,10 +85,10 @@ public:
void reset();
/**
- * This plays any queued up draws to its GrGpu target. It also resets this object (i.e. flushing
- * is destructive).
+ * Together these two functions flush all queued up draws to the Gpu.
*/
- void flush();
+ void prepareBatches(GrBatchFlushState* flushState);
+ void drawBatches(GrBatchFlushState* flushState);
/**
* Gets the capabilities of the draw target.
@@ -210,8 +205,6 @@ public:
const SkIRect& srcRect,
const SkIPoint& dstPoint);
- bool programUnitTest(GrContext* owner, int maxStages);
-
/** Provides access to internal functions to GrClipMaskManager without friending all of
GrDrawTarget to CMM. */
class CMMAccess {
@@ -311,12 +304,10 @@ private:
GrContext* fContext;
GrGpu* fGpu;
GrResourceProvider* fResourceProvider;
- GrBatchFlushState fFlushState;
bool fFlushing;
SkDEBUGCODE(int fDebugID;)
uint32_t fFlags;
- Options fOptions;
// 'this' drawTarget relies on the output of the drawTargets in 'fDependencies'
SkTDArray<GrDrawTarget*> fDependencies;
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698