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

Unified Diff: src/gpu/GrTargetCommands.h

Issue 1040303002: Use texture barriers to read directly from the RT (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zz1_reverseiter
Patch Set: fix windows build 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 | « src/gpu/GrGpu.h ('k') | 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 cff9898dadcbab75c606ec7284646dd26b11bbf7..4ab41dbaf1e311b01bfc87e86d1b28116c9b5890 100644
--- a/src/gpu/GrTargetCommands.h
+++ b/src/gpu/GrTargetCommands.h
@@ -56,6 +56,7 @@ public:
kDrawPath_CmdType = 6,
kDrawPaths_CmdType = 7,
kDrawBatch_CmdType = 8,
+ kXferBarrier_CmdType = 9,
};
Cmd(CmdType type) : fMarkerID(-1), fType(type) {}
@@ -151,6 +152,8 @@ private:
GrBatch*,
const GrDrawTarget::PipelineInfo&);
+ void recordXferBarrierIfNecessary(GrInOrderDrawBuffer*, const GrDrawTarget::PipelineInfo&);
+
struct Draw : public Cmd {
Draw(const GrDrawTarget::DrawInfo& info) : Cmd(kDraw_CmdType), fInfo(info) {}
@@ -276,6 +279,12 @@ private:
const GrPipeline* getPipeline() const {
return reinterpret_cast<const GrPipeline*>(fPipeline.get());
}
+ GrRenderTarget* getRenderTarget() const {
+ return this->getPipeline()->getRenderTarget();
+ }
+ const GrXferProcessor* getXferProcessor() const {
+ return this->getPipeline()->getXferProcessor();
+ }
void execute(GrGpu*, const SetState*) override;
@@ -303,6 +312,14 @@ private:
GrBatchTarget* fBatchTarget;
};
+ struct XferBarrier : public Cmd {
+ XferBarrier() : Cmd(kXferBarrier_CmdType) {}
+
+ void execute(GrGpu*, const SetState*) override;
+
+ GrXferBarrierType fBarrierType;
+ };
+
static const int kCmdBufferInitialSizeInBytes = 8 * 1024;
typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTargetCommands.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698