aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProgramDesc.h
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-02-04 06:14:22 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-04 06:14:22 -0800
commit3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd (patch)
tree8c92e754fbf5da2879845543632987c52479735e /src/gpu/GrProgramDesc.h
parent3b7f7b092c8233a651248da8f23e1cfc85ac829b (diff)
Revert "Move DstCopy on gpu into the GrXferProcessor."
This reverts commit 74a11753604768bf461b80cabb66060e8564d82c. TBR=joshualitt@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/896163003
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r--src/gpu/GrProgramDesc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 66e0e06b8c..e07e116733 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -55,6 +55,9 @@ public:
}
struct KeyHeader {
+ uint8_t fDstReadKey; // set by GrGLShaderBuilder if there
+ // are effects that must read the dst.
+ // Otherwise, 0.
uint8_t fFragPosKey; // set by GrGLShaderBuilder if there are
// effects that read the fragment position.
// Otherwise, 0.
@@ -76,6 +79,20 @@ public:
// This should really only be used internally, base classes should return their own headers
const KeyHeader& header() const { return *this->atOffset<KeyHeader, kHeaderOffset>(); }
+ // A struct to communicate descriptor information to the program descriptor builder
+ struct DescInfo {
+ bool operator==(const DescInfo& that) const {
+ return fReadsDst == that.fReadsDst &&
+ fReadsFragPosition == that.fReadsFragPosition;
+ }
+ bool operator!=(const DescInfo& that) const { return !(*this == that); };
+
+ // These flags give aggregated info on the processor stages that are used when building
+ // programs.
+ bool fReadsDst;
+ bool fReadsFragPosition;
+ };
+
private:
template<typename T, size_t OFFSET> T* atOffset() {
return reinterpret_cast<T*>(reinterpret_cast<intptr_t>(fKey.begin()) + OFFSET);