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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.h

Issue 772513002: create and thread batch tracker object (Closed) Base URL: https://skia.googlesource.com/skia.git@2_vertex_attr
Patch Set: rebase Created 6 years 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/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/GrGLProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGeometryProcessor.h
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h
index c3bee952665449a111f43d9834de5388e9c97b6b..a172904ac68aa1a55240051143c1c785247cb590 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -10,6 +10,7 @@
#include "GrGLProcessor.h"
+class GrBatchTracker;
class GrGLGPBuilder;
/**
@@ -25,16 +26,19 @@ public:
struct EmitArgs {
EmitArgs(GrGLGPBuilder* pb,
const GrGeometryProcessor& gp,
+ const GrBatchTracker& bt,
const char* outputColor,
const char* outputCoverage,
const TextureSamplerArray& samplers)
: fPB(pb)
, fGP(gp)
+ , fBT(bt)
, fOutputColor(outputColor)
, fOutputCoverage(outputCoverage)
, fSamplers(samplers) {}
GrGLGPBuilder* fPB;
const GrGeometryProcessor& fGP;
+ const GrBatchTracker& fBT;
const char* fOutputColor;
const char* fOutputCoverage;
const TextureSamplerArray& fSamplers;
@@ -45,6 +49,15 @@ public:
*/
virtual void emitCode(const EmitArgs&) = 0;
+ /** A GrGLGeometryProcessor instance can be reused with any GrGLGeometryProcessor that produces
+ the same stage key; this function reads data from a GrGLGeometryProcessor and uploads any
+ uniform variables required by the shaders created in emitCode(). The GrGeometryProcessor
+ parameter is guaranteed to be of the same type that created this GrGLGeometryProcessor and
+ to have an identical processor key as the one that created this GrGLGeometryProcessor. */
+ virtual void setData(const GrGLProgramDataManager&,
+ const GrGeometryProcessor&,
+ const GrBatchTracker&) = 0;
+
private:
typedef GrGLProcessor INHERITED;
};
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/gl/GrGLProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698