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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 862823004: Revert of GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: Created 5 years, 11 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 | « src/gpu/GrGeometryProcessor.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index a421b3c449010e5b6b538972b7aed125646f396b..afa7d27394d8428fcaa735466e29d287e5f81032 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -9,9 +9,6 @@
#define GrInOrderDrawBuffer_DEFINED
#include "GrFlushToGpuDrawTarget.h"
-
-#include "GrBatch.h"
-#include "GrBatchTarget.h"
#include "GrPipeline.h"
#include "GrPath.h"
#include "GrTRecorder.h"
@@ -56,14 +53,13 @@
private:
typedef GrGpu::DrawArgs DrawArgs;
enum {
- kDraw_Cmd = 1,
- kStencilPath_Cmd = 2,
- kSetState_Cmd = 3,
- kClear_Cmd = 4,
- kCopySurface_Cmd = 5,
- kDrawPath_Cmd = 6,
- kDrawPaths_Cmd = 7,
- kDrawBatch_Cmd = 8,
+ kDraw_Cmd = 1,
+ kStencilPath_Cmd = 2,
+ kSetState_Cmd = 3,
+ kClear_Cmd = 4,
+ kCopySurface_Cmd = 5,
+ kDrawPath_Cmd = 6,
+ kDrawPaths_Cmd = 7,
};
struct SetState;
@@ -184,7 +180,6 @@
// TODO: rename to SetPipeline once pp, batch tracker, and desc are removed
struct SetState : public Cmd {
- // TODO get rid of the prim proc version of this when we use batch everywhere
SetState(const GrPipelineBuilder& pipelineBuilder, const GrPrimitiveProcessor* primProc,
const GrDrawTargetCaps& caps,
const GrScissorState& scissor, const GrDeviceCoordTexture* dstCopy)
@@ -192,13 +187,6 @@
, fPrimitiveProcessor(primProc)
, fPipeline(pipelineBuilder, primProc, caps, scissor, dstCopy) {}
- SetState(GrBatch* batch,
- const GrPipelineBuilder& pipelineBuilder,
- const GrDrawTargetCaps& caps,
- const GrScissorState& scissor, const GrDeviceCoordTexture* dstCopy)
- : Cmd(kSetState_Cmd)
- , fPipeline(batch, pipelineBuilder, caps, scissor, dstCopy) {}
-
void execute(GrInOrderDrawBuffer*, const SetState*) SK_OVERRIDE;
typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitiveProcessor;
@@ -206,17 +194,6 @@
const GrPipeline fPipeline;
GrProgramDesc fDesc;
GrBatchTracker fBatchTracker;
- };
-
- struct DrawBatch : public Cmd {
- DrawBatch(GrBatch* batch) : Cmd(kDrawBatch_Cmd), fBatch(SkRef(batch)) {
- SkASSERT(!batch->isUsed());
- }
-
- void execute(GrInOrderDrawBuffer*, const SetState*) SK_OVERRIDE;
-
- // TODO it wouldn't be too hard to let batches allocate in the cmd buffer
- SkAutoTUnref<GrBatch> fBatch;
};
typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
@@ -231,10 +208,6 @@
const DrawInfo&,
const GrScissorState&,
const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
- void onDrawBatch(GrBatch*,
- const GrPipelineBuilder&,
- const GrScissorState&,
- const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
void onDrawRect(GrPipelineBuilder*,
GrColor,
const SkMatrix& viewMatrix,
@@ -280,24 +253,16 @@
// Determines whether the current draw operation requires a new GrPipeline and if so
// records it. If the draw can be skipped false is returned and no new GrPipeline is
// recorded.
- // TODO delete the primproc variant when we have batches everywhere
bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrPipelineBuilder&,
const GrPrimitiveProcessor*,
const GrScissorState&,
const GrDeviceCoordTexture*);
- bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(GrBatch*,
- const GrPipelineBuilder&,
- const GrScissorState&,
- const GrDeviceCoordTexture*);
-
// We lazily record clip changes in order to skip clips that have no effect.
void recordClipIfNecessary();
// Records any trace markers for a command after adding it to the buffer.
void recordTraceMarkersIfNecessary();
bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; }
-
- GrBatchTarget* getBatchTarget() { return &fBatchTarget; }
// TODO: Use a single allocator for commands and records
enum {
@@ -312,7 +277,6 @@
SkTDArray<char> fPathIndexBuffer;
SkTDArray<float> fPathTransformBuffer;
uint32_t fDrawID;
- GrBatchTarget fBatchTarget;
typedef GrFlushToGpuDrawTarget INHERITED;
};
« no previous file with comments | « src/gpu/GrGeometryProcessor.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698