diff options
author | Brian Salomon <bsalomon@google.com> | 2017-10-25 15:12:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-25 19:32:20 +0000 |
commit | 4cbb6e6d551e8bea2c040b1aa9dce253cffb9af0 (patch) | |
tree | a93401716e0f5d45760da36b49c8cf8ea8e1cc21 /include/effects | |
parent | 291af4f17e0630f78a8c4d22f304243fb28ae42b (diff) |
Pass GrRenderTargetContext's GrColorSpaceInfo to SkShader and SkColorFilter.
Also to SkColorTo(Premul|Unpremul)GrColor4f.
This can avoid cache lookups to find GrColorSpaceXforms as the xform pointer is stored in GrColorSpaceInfo after the first lookup.
Also uses GrColorSpaceInfo to construct GrTextUtils::Paint.
Bug: skia:
Change-Id: Idf19d512a60d2269e6921c7fb54d93aee499a70d
Reviewed-on: https://skia-review.googlesource.com/63660
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/effects')
-rw-r--r-- | include/effects/SkLumaColorFilter.h | 4 | ||||
-rw-r--r-- | include/effects/SkOverdrawColorFilter.h | 4 | ||||
-rw-r--r-- | include/effects/SkToSRGBColorFilter.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h index 1c35fc492a..ff7fa661b9 100644 --- a/include/effects/SkLumaColorFilter.h +++ b/include/effects/SkLumaColorFilter.h @@ -29,8 +29,8 @@ public: static sk_sp<SkColorFilter> Make(); #if SK_SUPPORT_GPU - std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(GrContext*, - SkColorSpace*) const override; + std::unique_ptr<GrFragmentProcessor> asFragmentProcessor( + GrContext*, const GrColorSpaceInfo&) const override; #endif SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkOverdrawColorFilter.h b/include/effects/SkOverdrawColorFilter.h index ac97821269..63f636a0cc 100644 --- a/include/effects/SkOverdrawColorFilter.h +++ b/include/effects/SkOverdrawColorFilter.h @@ -28,8 +28,8 @@ public: } #if SK_SUPPORT_GPU - std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(GrContext*, - SkColorSpace*) const override; + std::unique_ptr<GrFragmentProcessor> asFragmentProcessor( + GrContext*, const GrColorSpaceInfo&) const override; #endif void toString(SkString* str) const override; diff --git a/include/effects/SkToSRGBColorFilter.h b/include/effects/SkToSRGBColorFilter.h index 431cc02583..8642c019c3 100644 --- a/include/effects/SkToSRGBColorFilter.h +++ b/include/effects/SkToSRGBColorFilter.h @@ -22,8 +22,8 @@ public: static sk_sp<SkColorFilter> Make(sk_sp<SkColorSpace> srcColorSpace); #if SK_SUPPORT_GPU - std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(GrContext*, - SkColorSpace*) const override; + std::unique_ptr<GrFragmentProcessor> asFragmentProcessor( + GrContext*, const GrColorSpaceInfo&) const override; #endif SK_TO_STRING_OVERRIDE() |