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

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

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: Created 6 years, 6 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
Index: src/gpu/gl/GrGLProgramEffects.h
diff --git a/src/gpu/gl/GrGLProgramEffects.h b/src/gpu/gl/GrGLProgramEffects.h
index 769c7a133006fa5df49f21383cc9546caab29e96..978711bcdd8d79b3ab03dad4030b45ceaf169d3e 100644
--- a/src/gpu/gl/GrGLProgramEffects.h
+++ b/src/gpu/gl/GrGLProgramEffects.h
@@ -12,6 +12,7 @@
#include "GrTexture.h"
#include "GrTextureAccess.h"
#include "GrGLUniformManager.h"
+#include "GrGpu.h"
class GrEffectStage;
class GrGLVertexProgramEffectsBuilder;
@@ -28,6 +29,7 @@ class GrGLProgramEffects : public SkRefCnt {
public:
typedef GrBackendEffectFactory::EffectKey EffectKey;
typedef GrGLUniformManager::UniformHandle UniformHandle;
+ typedef GrGLUniformManager::FragmentInputHandle FragmentInputHandle;
/**
* These methods generate different portions of an effect's final key.
@@ -48,6 +50,7 @@ public:
* Calls setData() on each effect, and sets their transformation matrices and texture bindings.
*/
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLUniformManager&,
const GrEffectStage* effectStages[]) = 0;
@@ -152,6 +155,7 @@ public:
class GrGLVertexProgramEffects : public GrGLProgramEffects {
public:
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLUniformManager&,
const GrEffectStage* effectStages[]) SK_OVERRIDE;
@@ -195,15 +199,23 @@ private:
/**
* Helper for setData(). Sets all the transform matrices for an effect.
*/
- void setTransformData(const GrGLUniformManager&, const GrDrawEffect&, int effectIdx);
+ void setTransformData(GrGpuGL* gpu, const GrGLUniformManager&, const GrDrawEffect&, int effectIdx);
+ void setFragmentInputTransformData(GrGpuGL* gpu, const GrGLUniformManager&, const GrDrawEffect&,
+ int effectIdx);
struct Transform {
Transform() { fCurrentValue = SkMatrix::InvalidMatrix(); }
UniformHandle fHandle;
SkMatrix fCurrentValue;
};
-
+ struct FragmentInputTransform {
+ FragmentInputTransform() { fCurrentValue = SkMatrix::InvalidMatrix(); }
+ FragmentInputHandle fHandle;
+ SkMatrix fCurrentValue;
+ GrSLType fType;
+ };
SkTArray<SkSTArray<2, Transform, true> > fTransforms;
+ SkTArray<SkTArray<FragmentInputTransform, true> > fFragmentInputTransforms;
bool fHasExplicitLocalCoords;
typedef GrGLProgramEffects INHERITED;
@@ -245,6 +257,7 @@ private:
class GrGLPathTexGenProgramEffects : public GrGLProgramEffects {
public:
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLUniformManager&,
const GrEffectStage* effectStages[]) SK_OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698