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

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: address review comments (rebase to separated patches) Created 6 years, 4 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 7ae925b69b51073f57731b02d3b8a932f134c851..5edaa44c3c5c84c4f9a916f00913537dbc2b7ff8 100644
--- a/src/gpu/gl/GrGLProgramEffects.h
+++ b/src/gpu/gl/GrGLProgramEffects.h
@@ -10,6 +10,7 @@
#include "GrBackendEffectFactory.h"
#include "GrGLProgramDataManager.h"
+#include "GrGpu.h"
#include "GrTexture.h"
#include "GrTextureAccess.h"
@@ -28,6 +29,7 @@ class GrGLFragmentOnlyShaderBuilder;
class GrGLProgramEffects : public SkRefCnt {
public:
typedef GrGLProgramDataManager::UniformHandle UniformHandle;
+ typedef GrGLProgramDataManager::VaryingHandle VaryingHandle;
/**
* This class emits some of the code inserted into the shaders for an effect. The code it
@@ -51,6 +53,7 @@ public:
* Calls setData() on each effect, and sets their transformation matrices and texture bindings.
*/
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLProgramDataManager&,
const GrEffectStage* effectStages[]) = 0;
@@ -162,6 +165,7 @@ public:
class GrGLVertexProgramEffects : public GrGLProgramEffects {
public:
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLProgramDataManager&,
const GrEffectStage* effectStages[]) SK_OVERRIDE;
@@ -204,7 +208,9 @@ private:
/**
* Helper for setData(). Sets all the transform matrices for an effect.
*/
- void setTransformData(const GrGLProgramDataManager&, const GrDrawEffect&, int effectIdx);
+ void setTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrDrawEffect&, int effectIdx);
+ void setPathTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrDrawEffect&,
+ int effectIdx);
struct Transform {
Transform() { fCurrentValue = SkMatrix::InvalidMatrix(); }
@@ -212,7 +218,15 @@ private:
SkMatrix fCurrentValue;
};
+ struct PathTransform {
+ PathTransform() { fCurrentValue = SkMatrix::InvalidMatrix(); }
+ VaryingHandle fHandle;
+ SkMatrix fCurrentValue;
+ GrSLType fType;
+ };
+
SkTArray<SkSTArray<2, Transform, true> > fTransforms;
+ SkTArray<SkTArray<PathTransform, true> > fPathTransforms;
bool fHasExplicitLocalCoords;
typedef GrGLProgramEffects INHERITED;
@@ -254,6 +268,7 @@ private:
class GrGLPathTexGenProgramEffects : public GrGLProgramEffects {
public:
virtual void setData(GrGpuGL*,
+ GrGpu::DrawType,
const GrGLProgramDataManager&,
const GrEffectStage* effectStages[]) SK_OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698