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

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

Issue 746423007: Draft change to start pulling uniform color into GP (Closed) Base URL: https://skia.googlesource.com/skia.git@no_factories
Patch Set: missed some places to update uniform cache 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
Index: src/gpu/gl/GrGLGeometryProcessor.h
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h
index aa58cd3d97aa16b5a55a8f76f231f67bc09524c9..d77ab305f7c395ff365d16e84b293d9a2aadd66c 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.h
+++ b/src/gpu/gl/GrGLGeometryProcessor.h
@@ -23,7 +23,9 @@ public:
GrGLGeometryProcessor() {}
virtual ~GrGLGeometryProcessor() {}
+ typedef GrGLProgramDataManager::UniformHandle UniformHandle;
typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray;
+
struct EmitArgs {
EmitArgs(GrGLGPBuilder* pb,
const GrGeometryProcessor& gp,
@@ -44,6 +46,7 @@ public:
const char* fOutputCoverage;
const TextureSamplerArray& fSamplers;
};
+
/**
* 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.
@@ -59,6 +62,14 @@ public:
const GrGeometryProcessor&,
const GrBatchTracker&) = 0;
+protected:
+ /* a helper which can setup vertex, constant, or uniform color depending on inputType */
bsalomon 2014/12/15 15:31:14 Maybe a little more info about the params, e.g. wh
+ void setupColor(GrGLGPBuilder* pb,
+ GrGPInput inputType,
+ const char* inputName,
+ const GrGeometryProcessor::GrAttribute* colorAttr,
+ UniformHandle* colorUniform);
+
private:
typedef GrGLProcessor INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698