aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTargetCommands.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-08-18 09:20:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-18 09:20:09 -0700
commit5346983b2e0726b4009cc546b01c58a8919e6c36 (patch)
treed2b83b17e9f0c2482278d9b808199f95462d942d /src/gpu/GrTargetCommands.h
parentd55d13af4f73d00e9d8f95d233f977de3df83d05 (diff)
Put clear and discard into GrBatch.
Diffstat (limited to 'src/gpu/GrTargetCommands.h')
-rw-r--r--src/gpu/GrTargetCommands.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h
index 3c08d2d24d..cf3054deab 100644
--- a/src/gpu/GrTargetCommands.h
+++ b/src/gpu/GrTargetCommands.h
@@ -15,7 +15,8 @@
#include "GrRenderTarget.h"
#include "GrTRecorder.h"
-#include "batches/GrDrawBatch.h"
+#include "batches/GrBatch.h"
+
#include "SkRect.h"
class GrResourceProvider;
@@ -30,12 +31,11 @@ public:
public:
enum CmdType {
kStencilPath_CmdType = 1,
- kClear_CmdType = 2,
- kClearStencil_CmdType = 3,
- kCopySurface_CmdType = 4,
- kDrawPath_CmdType = 5,
- kDrawPaths_CmdType = 6,
- kDrawBatch_CmdType = 7,
+ kClearStencil_CmdType = 2,
+ kCopySurface_CmdType = 3,
+ kDrawPath_CmdType = 4,
+ kDrawPaths_CmdType = 5,
+ kDrawBatch_CmdType = 6,
};
Cmd(CmdType type)
@@ -177,21 +177,6 @@ private:
GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
};
- // This is also used to record a discard by setting the color to GrColor_ILLEGAL
- struct Clear : public Cmd {
- Clear(GrRenderTarget* rt) : Cmd(kClear_CmdType), fRenderTarget(rt) {}
-
- GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
-
- void execute(GrBatchFlushState*) override;
-
- SkIRect fRect;
- GrColor fColor;
-
- private:
- GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
- };
-
// This command is ONLY used by the clip mask manager to clear the stencil clip bits
struct ClearStencilClip : public Cmd {
ClearStencilClip(GrRenderTarget* rt) : Cmd(kClearStencil_CmdType), fRenderTarget(rt) {}
@@ -228,17 +213,17 @@ private:
};
struct DrawBatch : public Cmd {
- DrawBatch(GrDrawBatch* batch)
+ DrawBatch(GrBatch* batch)
: Cmd(kDrawBatch_CmdType)
, fBatch(SkRef(batch)){
SkASSERT(!batch->isUsed());
}
- GrDrawBatch* batch() { return fBatch; }
+ GrBatch* batch() { return fBatch; }
void execute(GrBatchFlushState*) override;
private:
- SkAutoTUnref<GrDrawBatch> fBatch;
+ SkAutoTUnref<GrBatch> fBatch;
};
static const int kCmdBufferInitialSizeInBytes = 8 * 1024;