diff options
author | 2017-05-25 15:29:13 -0400 | |
---|---|---|
committer | 2017-05-25 20:05:08 +0000 | |
commit | fabe0b26d05624ce7374f6ca89bd66df6142534e (patch) | |
tree | f32b5873b31185d7e86e6c48fbdbd654efb8af7a /src/effects/gradients/Sk4fLinearGradient.h | |
parent | 1c214313248a4b5a69af14539608c54fb67c2bf8 (diff) |
Relocate shaders to own dir
Consolidate all shader impls under src/shaders/.
Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3
Reviewed-on: https://skia-review.googlesource.com/17927
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/effects/gradients/Sk4fLinearGradient.h')
-rw-r--r-- | src/effects/gradients/Sk4fLinearGradient.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/effects/gradients/Sk4fLinearGradient.h b/src/effects/gradients/Sk4fLinearGradient.h deleted file mode 100644 index eebd30fbf5..0000000000 --- a/src/effects/gradients/Sk4fLinearGradient.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef Sk4fLinearGradient_DEFINED -#define Sk4fLinearGradient_DEFINED - -#include "Sk4fGradientBase.h" -#include "SkLinearGradient.h" - -class SkLinearGradient:: -LinearGradient4fContext final : public GradientShaderBase4fContext { -public: - LinearGradient4fContext(const SkLinearGradient&, const ContextRec&); - - void shadeSpan(int x, int y, SkPMColor dst[], int count) override; - void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override; - -protected: - void mapTs(int x, int y, SkScalar ts[], int count) const override; - - bool onChooseBlitProcs(const SkImageInfo&, BlitState*) override; - -private: - using INHERITED = GradientShaderBase4fContext; - - template<DstType, ApplyPremul, TileMode> - class LinearIntervalProcessor; - - template <DstType dstType, ApplyPremul premul> - void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type[], - int count) const; - - template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode> - void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Type[], - int count) const; - - const Sk4fGradientInterval* findInterval(SkScalar fx) const; - - bool isFast() const { return fDstToPosClass == kLinear_MatrixClass; } - - static void D32_BlitBW(BlitState*, int x, int y, const SkPixmap& dst, int count); - static void D64_BlitBW(BlitState*, int x, int y, const SkPixmap& dst, int count); - - mutable const Sk4fGradientInterval* fCachedInterval; -}; - -#endif // Sk4fLinearGradient_DEFINED |