Remove Cmd in GrTargetCommands that is no longer needed with GrCopySurfaceBatch
TBR=joshualitt@google.com Review URL: https://codereview.chromium.org/1292623004
This commit is contained in:
parent
08f9234eaa
commit
f46c5e8fdb
@ -75,7 +75,3 @@ void GrTargetCommands::DrawPaths::execute(GrBatchFlushState* state) {
|
|||||||
void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) {
|
void GrTargetCommands::DrawBatch::execute(GrBatchFlushState* state) {
|
||||||
fBatch->draw(state);
|
fBatch->draw(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GrTargetCommands::CopySurface::execute(GrBatchFlushState* state) {
|
|
||||||
state->gpu()->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint);
|
|
||||||
}
|
|
||||||
|
@ -31,10 +31,9 @@ public:
|
|||||||
public:
|
public:
|
||||||
enum CmdType {
|
enum CmdType {
|
||||||
kStencilPath_CmdType = 1,
|
kStencilPath_CmdType = 1,
|
||||||
kCopySurface_CmdType = 2,
|
kDrawPath_CmdType = 2,
|
||||||
kDrawPath_CmdType = 3,
|
kDrawPaths_CmdType = 3,
|
||||||
kDrawPaths_CmdType = 4,
|
kDrawBatch_CmdType = 4,
|
||||||
kDrawBatch_CmdType = 5,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Cmd(CmdType type)
|
Cmd(CmdType type)
|
||||||
@ -176,26 +175,6 @@ private:
|
|||||||
GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
|
GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CopySurface : public Cmd {
|
|
||||||
CopySurface(GrSurface* dst, GrSurface* src)
|
|
||||||
: Cmd(kCopySurface_CmdType)
|
|
||||||
, fDst(dst)
|
|
||||||
, fSrc(src) {
|
|
||||||
}
|
|
||||||
|
|
||||||
GrSurface* dst() const { return fDst.get(); }
|
|
||||||
GrSurface* src() const { return fSrc.get(); }
|
|
||||||
|
|
||||||
void execute(GrBatchFlushState*) override;
|
|
||||||
|
|
||||||
SkIPoint fDstPoint;
|
|
||||||
SkIRect fSrcRect;
|
|
||||||
|
|
||||||
private:
|
|
||||||
GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst;
|
|
||||||
GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DrawBatch : public Cmd {
|
struct DrawBatch : public Cmd {
|
||||||
DrawBatch(GrBatch* batch)
|
DrawBatch(GrBatch* batch)
|
||||||
: Cmd(kDrawBatch_CmdType)
|
: Cmd(kDrawBatch_CmdType)
|
||||||
|
Loading…
Reference in New Issue
Block a user