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

Unified Diff: src/gpu/GrTargetCommands.h

Issue 1116923003: simple cleanup in GrTargetCommands (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 8 months 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 | « no previous file | src/gpu/GrTargetCommands.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTargetCommands.h
diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h
index 4ab41dbaf1e311b01bfc87e86d1b28116c9b5890..42a8ca3d65c2cab4cda2cc328b940f534ebb4dc6 100644
--- a/src/gpu/GrTargetCommands.h
+++ b/src/gpu/GrTargetCommands.h
@@ -19,15 +19,6 @@
#include "SkRect.h"
#include "SkTypes.h"
-// This is just to get a flag
-// TODO remove this when batch is everywhere
-#include "GrTextContext.h"
-#ifdef USE_BITMAP_TEXTBLOBS
-#define CLOSE_BATCH
-#else
-#define CLOSE_BATCH this->closeBatch();
-#endif
-
class GrInOrderDrawBuffer;
class GrVertexBufferAllocPool;
class GrIndexBufferAllocPool;
@@ -41,22 +32,20 @@ public:
GrIndexBufferAllocPool* indexPool)
: fCmdBuffer(kCmdBufferInitialSizeInBytes)
, fPrevState(NULL)
- , fBatchTarget(gpu, vertexPool, indexPool)
- , fDrawBatch(NULL) {
+ , fBatchTarget(gpu, vertexPool, indexPool) {
}
class Cmd : ::SkNoncopyable {
public:
enum CmdType {
- kDraw_CmdType = 1,
- kStencilPath_CmdType = 2,
- kSetState_CmdType = 3,
- kClear_CmdType = 4,
- kCopySurface_CmdType = 5,
- kDrawPath_CmdType = 6,
- kDrawPaths_CmdType = 7,
- kDrawBatch_CmdType = 8,
- kXferBarrier_CmdType = 9,
+ kStencilPath_CmdType = 1,
+ kSetState_CmdType = 2,
+ kClear_CmdType = 3,
+ kCopySurface_CmdType = 4,
+ kDrawPath_CmdType = 5,
+ kDrawPaths_CmdType = 6,
+ kDrawBatch_CmdType = 7,
+ kXferBarrier_CmdType = 8,
};
Cmd(CmdType type) : fMarkerID(-1), fType(type) {}
@@ -154,14 +143,6 @@ private:
void recordXferBarrierIfNecessary(GrInOrderDrawBuffer*, const GrDrawTarget::PipelineInfo&);
- struct Draw : public Cmd {
- Draw(const GrDrawTarget::DrawInfo& info) : Cmd(kDraw_CmdType), fInfo(info) {}
-
- void execute(GrGpu*, const SetState*) override;
-
- GrDrawTarget::DrawInfo fInfo;
- };
-
struct StencilPath : public Cmd {
StencilPath(const GrPath* path, GrRenderTarget* rt)
: Cmd(kStencilPath_CmdType)
@@ -328,12 +309,6 @@ private:
CmdBuffer fCmdBuffer;
SetState* fPrevState;
GrBatchTarget fBatchTarget;
- // TODO hack until batch is everywhere
- GrTargetCommands::DrawBatch* fDrawBatch;
-
- // This will go away when everything uses batch. However, in the short term anything which
- // might be put into the GrInOrderDrawBuffer needs to make sure it closes the last batch
- void closeBatch();
};
#endif
« no previous file with comments | « no previous file | src/gpu/GrTargetCommands.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698