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/effects/GrDashingEffect.cpp

Issue 1428543003: Create GLSL base class for ProgramDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add space Created 5 years, 2 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/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 106ee49672481aca90307ac772b9bfb1ad64c0a4..4a8c09ea55ec97f56ff8ea470d94c1ca4c3fd51e 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -24,6 +24,7 @@
#include "gl/GrGLGeometryProcessor.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
///////////////////////////////////////////////////////////////////////////////
@@ -821,10 +822,10 @@ public:
const GrGLSLCaps&,
GrProcessorKeyBuilder*);
- void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&) override;
+ void setData(const GrGLSLProgramDataManager&, const GrPrimitiveProcessor&) override;
void setTransformData(const GrPrimitiveProcessor& primProc,
- const GrGLProgramDataManager& pdman,
+ const GrGLSLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) override {
this->setTransformDataHelper<DashingCircleEffect>(primProc, pdman, index, transforms);
@@ -896,11 +897,11 @@ void GLDashingCircleEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
fsBuilder->codeAppendf("%s = vec4(alpha);", args.fOutputCoverage);
}
-void GLDashingCircleEffect::setData(const GrGLProgramDataManager& pdman,
+void GLDashingCircleEffect::setData(const GrGLSLProgramDataManager& pdman,
const GrPrimitiveProcessor& processor) {
const DashingCircleEffect& dce = processor.cast<DashingCircleEffect>();
if (dce.color() != fColor) {
- GrGLfloat c[4];
+ float c[4];
GrColorToRGBAFloat(dce.color(), c);
pdman.set4fv(fColorUniform, 1, c);
fColor = dce.color();
@@ -1032,10 +1033,10 @@ public:
const GrGLSLCaps&,
GrProcessorKeyBuilder*);
- void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&) override;
+ void setData(const GrGLSLProgramDataManager&, const GrPrimitiveProcessor&) override;
void setTransformData(const GrPrimitiveProcessor& primProc,
- const GrGLProgramDataManager& pdman,
+ const GrGLSLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) override {
this->setTransformDataHelper<DashingLineEffect>(primProc, pdman, index, transforms);
@@ -1120,11 +1121,11 @@ void GLDashingLineEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
fsBuilder->codeAppendf("%s = vec4(alpha);", args.fOutputCoverage);
}
-void GLDashingLineEffect::setData(const GrGLProgramDataManager& pdman,
+void GLDashingLineEffect::setData(const GrGLSLProgramDataManager& pdman,
const GrPrimitiveProcessor& processor) {
const DashingLineEffect& de = processor.cast<DashingLineEffect>();
if (de.color() != fColor) {
- GrGLfloat c[4];
+ float c[4];
GrColorToRGBAFloat(de.color(), c);
pdman.set4fv(fColorUniform, 1, c);
fColor = de.color();
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698