aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLXferProcessor.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-06 07:02:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-06 07:02:37 -0800
commit50785a3d10b53bea5beb6e18431a2449860be237 (patch)
tree32a67ea76db96f6f94f7d1ce54ff354da5c30e95 /src/gpu/gl/GrGLXferProcessor.h
parent5245cb427f982dbae365a52cf19256cfbcc6870a (diff)
Revert of Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #1 id:1 of https://codereview.chromium.org/901663007/)
Reason for revert: The revert didn't help the 10.9 bot. Unreverting by reverting the revert (which is basically relanding the original patch which itself was a revert of a revert). Revert. Original issue's description: > Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/) > > Reason for revert: > Testing to see if reverting fixes 10.9 bots. > > Original issue's description: > > Move DstCopy on gpu into the GrXferProcessor. > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c > > > > Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69 > > TBR=joshualitt@google.com,egdaniel@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/21b2c53218ab25f4268e3992e51d916076a2a7ee TBR=joshualitt@google.com,egdaniel@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/873723009
Diffstat (limited to 'src/gpu/gl/GrGLXferProcessor.h')
-rw-r--r--src/gpu/gl/GrGLXferProcessor.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLXferProcessor.h b/src/gpu/gl/GrGLXferProcessor.h
index 5c92559031..7f60f32fe5 100644
--- a/src/gpu/gl/GrGLXferProcessor.h
+++ b/src/gpu/gl/GrGLXferProcessor.h
@@ -11,6 +11,7 @@
#include "GrGLProcessor.h"
class GrGLXPBuilder;
+class GrXferProcessor;
class GrGLXferProcessor {
public:
@@ -46,16 +47,25 @@ public:
* This is similar to emitCode() in the base class, except it takes a full shader builder.
* This allows the effect subclass to emit vertex code.
*/
- virtual void emitCode(const EmitArgs&) = 0;
+ void emitCode(const EmitArgs&);
/** A GrGLXferProcessor instance can be reused with any GrGLXferProcessor that produces
the same stage key; this function reads data from a GrGLXferProcessor and uploads any
uniform variables required by the shaders created in emitCode(). The GrXferProcessor
parameter is guaranteed to be of the same type that created this GrGLXferProcessor and
- to have an identical processor key as the one that created this GrGLXferProcessor. */
- virtual void setData(const GrGLProgramDataManager&,
- const GrXferProcessor&) = 0;
+ to have an identical processor key as the one that created this GrGLXferProcessor. This
+ function calls onSetData on the subclass of GrGLXferProcessor
+ */
+ void setData(const GrGLProgramDataManager& pdm, const GrXferProcessor& xp);
+
private:
+ virtual void onEmitCode(const EmitArgs&) = 0;
+
+ virtual void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) = 0;
+
+ GrGLProgramDataManager::UniformHandle fDstCopyTopLeftUni;
+ GrGLProgramDataManager::UniformHandle fDstCopyScaleUni;
+
typedef GrGLProcessor INHERITED;
};
#endif