aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-24 16:24:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-24 22:03:40 +0000
commit901f29ad3e38b7072a2abef5ff1665cd755d21a2 (patch)
tree8b231c4cf579b0c591014c5287790b40d38e8868 /include
parentc8c901fc36816b9a2603a8c129cdca1d2b4d7fe2 (diff)
Allow GrSingleTextureEffect to take GrTextureProxies
Change-Id: I1dd441a5838f665c6815a5c629f5763f43f66e09 Reviewed-on: https://skia-review.googlesource.com/7429 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrPaint.h12
-rw-r--r--include/gpu/GrProcessor.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 3b136ac82e..2649b9e18b 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -20,6 +20,8 @@
#include "SkTLazy.h"
#include "effects/GrPorterDuffXferProcessor.h"
+class GrTextureProxy;
+
/**
* The paint describes how color and coverage are computed at each pixel by GrContext draw
* functions and the how color is blended with the destination pixel.
@@ -116,6 +118,16 @@ public:
const GrSamplerParams&);
void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrSamplerParams&);
+
+ void addColorTextureProcessor(GrContext*, sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
+ const SkMatrix&);
+ void addColorTextureProcessor(GrContext*, sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
+ const SkMatrix&, const GrSamplerParams&);
+
+ void addCoverageTextureProcessor(GrContext*, sk_sp<GrTextureProxy>, const SkMatrix&);
+ void addCoverageTextureProcessor(GrContext*, sk_sp<GrTextureProxy>,
+ const SkMatrix&, const GrSamplerParams&);
+
int numColorFragmentProcessors() const { return fColorFragmentProcessors.count(); }
int numCoverageFragmentProcessors() const { return fCoverageFragmentProcessors.count(); }
int numTotalFragmentProcessors() const { return this->numColorFragmentProcessors() +
diff --git a/include/gpu/GrProcessor.h b/include/gpu/GrProcessor.h
index a8e31f2c86..388bd54092 100644
--- a/include/gpu/GrProcessor.h
+++ b/include/gpu/GrProcessor.h
@@ -211,6 +211,8 @@ public:
SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
GrShaderFlags visibility = kFragment_GrShaderFlag);
+ TextureSampler(GrTextureProvider*, sk_sp<GrTextureProxy>, const GrSamplerParams&);
+
// MDB TODO: ultimately we shouldn't need the texProvider parameter
explicit TextureSampler(GrTextureProvider*, sk_sp<GrTextureProxy>,
GrSamplerParams::FilterMode = GrSamplerParams::kNone_FilterMode,