aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPaint.cpp
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 /src/gpu/GrPaint.cpp
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 'src/gpu/GrPaint.cpp')
-rw-r--r--src/gpu/GrPaint.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 5bcd28a69e..c68b4b1089 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -44,6 +44,37 @@ void GrPaint::addCoverageTextureProcessor(GrTexture* texture,
params));
}
+void GrPaint::addColorTextureProcessor(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrColorSpaceXform> colorSpaceXform,
+ const SkMatrix& matrix) {
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(ctx, std::move(proxy),
+ std::move(colorSpaceXform),
+ matrix));
+}
+
+void GrPaint::addColorTextureProcessor(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrColorSpaceXform> colorSpaceXform,
+ const SkMatrix& matrix,
+ const GrSamplerParams& params) {
+ this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(ctx,
+ std::move(proxy),
+ std::move(colorSpaceXform),
+ matrix, params));
+}
+
+void GrPaint::addCoverageTextureProcessor(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+ const SkMatrix& matrix) {
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(ctx, std::move(proxy),
+ nullptr, matrix));
+}
+
+void GrPaint::addCoverageTextureProcessor(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+ const SkMatrix& matrix,
+ const GrSamplerParams& params) {
+ this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(ctx, std::move(proxy),
+ nullptr, matrix, params));
+}
+
bool GrPaint::internalIsConstantBlendedColor(GrColor paintColor, GrColor* color) const {
GrProcOptInfo colorProcInfo(paintColor, kRGBA_GrColorComponentFlags);
colorProcInfo.analyzeProcessors(