aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-08 06:51:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-08 06:51:43 -0700
commit8ca93e7c733ab064c8a9e03715ac405ae739cf51 (patch)
tree5423fe8631957bf363453c8c5f7ce3e19a6e51e4 /include
parent2f19b551ac10b96a1a35a147063cd4300d6fe07a (diff)
Initial CL to create dummy GrShaderDataManager and thread it through
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1225673007
Diffstat (limited to 'include')
-rw-r--r--include/core/SkShader.h3
-rw-r--r--include/effects/SkPerlinNoiseShader.h2
-rw-r--r--include/gpu/GrPaint.h4
-rw-r--r--include/gpu/GrShaderDataManager.h13
4 files changed, 20 insertions, 2 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 119da87666..315d7a5680 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -20,6 +20,7 @@ class SkPicture;
class SkXfermode;
class GrContext;
class GrFragmentProcessor;
+class GrShaderDataManager;
/** \class SkShader
*
@@ -364,7 +365,7 @@ public:
*/
virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix* localMatrix, GrColor*,
- GrFragmentProcessor**) const;
+ GrShaderDataManager*, GrFragmentProcessor**) const;
/**
* If the shader can represent its "average" luminance in a single color, return true and
diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h
index fe1c9c5728..c6a2687c19 100644
--- a/include/effects/SkPerlinNoiseShader.h
+++ b/include/effects/SkPerlinNoiseShader.h
@@ -97,7 +97,7 @@ public:
};
virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const SkMatrix& viewM,
- const SkMatrix*, GrColor*,
+ const SkMatrix*, GrColor*, GrShaderDataManager*,
GrFragmentProcessor**) const override;
SK_TO_STRING_OVERRIDE()
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 75d3a2d0da..d1c2775f1f 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -12,6 +12,7 @@
#include "GrColor.h"
#include "GrFragmentStage.h"
+#include "GrShaderDataManager.h"
#include "GrXferProcessor.h"
#include "effects/GrPorterDuffXferProcessor.h"
@@ -136,6 +137,8 @@ public:
*/
bool isConstantBlendedColor(GrColor* constantColor) const;
+ GrShaderDataManager* getShaderDataManager() { return &fShaderDataManager; }
+
private:
mutable SkAutoTUnref<const GrXPFactory> fXPFactory;
SkSTArray<4, GrFragmentStage> fColorStages;
@@ -145,6 +148,7 @@ private:
bool fDither;
GrColor fColor;
+ GrShaderDataManager fShaderDataManager;
};
#endif
diff --git a/include/gpu/GrShaderDataManager.h b/include/gpu/GrShaderDataManager.h
new file mode 100644
index 0000000000..93d33b47a3
--- /dev/null
+++ b/include/gpu/GrShaderDataManager.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrShaderDataManager_DEFINED
+#define GrShaderDataManager_DEFINED
+
+class GrShaderDataManager {};
+
+#endif