Flutter Engine
The Flutter Engine
Namespaces | Macros | Typedefs | Functions
GrFragmentProcessors.cpp File Reference
#include "src/gpu/ganesh/GrFragmentProcessors.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPicture.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/core/SkSpan.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrRecordingContext.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkTArray.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"
#include "src/base/SkTLazy.h"
#include "src/core/SkBlendModeBlender.h"
#include "src/core/SkBlenderBase.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkColorSpaceXformSteps.h"
#include "src/core/SkMaskFilterBase.h"
#include "src/core/SkRuntimeBlender.h"
#include "src/core/SkRuntimeEffectPriv.h"
#include "src/effects/SkShaderMaskFilterImpl.h"
#include "src/effects/colorfilters/SkBlendModeColorFilter.h"
#include "src/effects/colorfilters/SkColorFilterBase.h"
#include "src/effects/colorfilters/SkColorSpaceXformColorFilter.h"
#include "src/effects/colorfilters/SkComposeColorFilter.h"
#include "src/effects/colorfilters/SkGaussianColorFilter.h"
#include "src/effects/colorfilters/SkMatrixColorFilter.h"
#include "src/effects/colorfilters/SkRuntimeColorFilter.h"
#include "src/effects/colorfilters/SkTableColorFilter.h"
#include "src/effects/colorfilters/SkWorkingFormatColorFilter.h"
#include "src/gpu/ResourceKey.h"
#include "src/gpu/Swizzle.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrColorInfo.h"
#include "src/gpu/ganesh/GrColorSpaceXform.h"
#include "src/gpu/ganesh/GrFPArgs.h"
#include "src/gpu/ganesh/GrFragmentProcessor.h"
#include "src/gpu/ganesh/GrProxyProvider.h"
#include "src/gpu/ganesh/GrRecordingContextPriv.h"
#include "src/gpu/ganesh/GrSamplerState.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/GrSurfaceProxy.h"
#include "src/gpu/ganesh/GrSurfaceProxyView.h"
#include "src/gpu/ganesh/GrTextureProxy.h"
#include "src/gpu/ganesh/SkGr.h"
#include "src/gpu/ganesh/effects/GrBlendFragmentProcessor.h"
#include "src/gpu/ganesh/effects/GrColorTableEffect.h"
#include "src/gpu/ganesh/effects/GrMatrixEffect.h"
#include "src/gpu/ganesh/effects/GrPerlinNoise2Effect.h"
#include "src/gpu/ganesh/effects/GrSkSLFP.h"
#include "src/gpu/ganesh/effects/GrTextureEffect.h"
#include "src/gpu/ganesh/gradients/GrGradientShader.h"
#include "src/gpu/ganesh/image/GrImageUtils.h"
#include "src/shaders/SkBlendShader.h"
#include "src/shaders/SkColorFilterShader.h"
#include "src/shaders/SkColorShader.h"
#include "src/shaders/SkCoordClampShader.h"
#include "src/shaders/SkEmptyShader.h"
#include "src/shaders/SkImageShader.h"
#include "src/shaders/SkLocalMatrixShader.h"
#include "src/shaders/SkPerlinNoiseShaderImpl.h"
#include "src/shaders/SkPictureShader.h"
#include "src/shaders/SkRuntimeShader.h"
#include "src/shaders/SkShaderBase.h"
#include "src/shaders/SkTransformShader.h"
#include "src/shaders/SkTriColorShader.h"
#include "src/shaders/SkWorkingColorSpaceShader.h"
#include "src/shaders/gradients/SkConicalGradient.h"
#include "src/shaders/gradients/SkGradientBaseShader.h"
#include "src/shaders/gradients/SkLinearGradient.h"
#include "src/shaders/gradients/SkRadialGradient.h"
#include "src/shaders/gradients/SkSweepGradient.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <optional>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  GrFragmentProcessors
 

Macros

#define M(type)
 
#define M(type)
 
#define M(type)
 
#define M(type)
 

Typedefs

using GrFragmentProcessors::ChildType = SkRuntimeEffect::ChildType
 

Functions

static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_fp_from_shader_mask_filter (const SkMaskFilterBase *maskfilter, const GrFPArgs &args, const SkMatrix &ctm)
 
std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::Make (const SkMaskFilter *maskfilter, const GrFPArgs &args, const SkMatrix &ctm)
 
bool GrFragmentProcessors::IsSupported (const SkMaskFilter *maskfilter)
 
GrFPResult GrFragmentProcessors::MakeChildFP (const SkRuntimeEffect::ChildPtr &child, const GrFPArgs &childArgs)
 
static GrFPResult GrFragmentProcessors::make_effect_fp (sk_sp< SkRuntimeEffect > effect, const char *name, sk_sp< const SkData > uniforms, std::unique_ptr< GrFragmentProcessor > inputFP, std::unique_ptr< GrFragmentProcessor > destColorFP, SkSpan< const SkRuntimeEffect::ChildPtr > children, const GrFPArgs &childArgs)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_blender_fp (const SkRuntimeBlender *rtb, std::unique_ptr< GrFragmentProcessor > srcFP, std::unique_ptr< GrFragmentProcessor > dstFP, const GrFPArgs &fpArgs)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_blender_fp (const SkBlendModeBlender *blender, std::unique_ptr< GrFragmentProcessor > srcFP, std::unique_ptr< GrFragmentProcessor > dstFP, const GrFPArgs &fpArgs)
 
std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::Make (const SkBlenderBase *blender, std::unique_ptr< GrFragmentProcessor > srcFP, std::unique_ptr< GrFragmentProcessor > dstFP, const GrFPArgs &fpArgs)
 
static SkPMColor4f GrFragmentProcessors::map_color (const SkColor4f &c, SkColorSpace *src, SkColorSpace *dst)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *, const SkBlendModeColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &dstColorInfo, const SkSurfaceProps &props)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *context, const SkComposeColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &dstColorInfo, const SkSurfaceProps &props)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *, const SkColorSpaceXformColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &, const SkSurfaceProps &)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *, const SkGaussianColorFilter *, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &, const SkSurfaceProps &)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::rgb_to_hsl (std::unique_ptr< GrFragmentProcessor > child)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::hsl_to_rgb (std::unique_ptr< GrFragmentProcessor > child)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *, const SkMatrixColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &, const SkSurfaceProps &)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *context, const SkRuntimeColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &colorInfo, const SkSurfaceProps &props)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *context, const SkTableColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &, const SkSurfaceProps &)
 
static GrFPResult GrFragmentProcessors::make_colorfilter_fp (GrRecordingContext *context, const SkWorkingFormatColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &dstColorInfo, const SkSurfaceProps &props)
 
GrFPResult GrFragmentProcessors::Make (GrRecordingContext *ctx, const SkColorFilter *cf, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &dstColorInfo, const SkSurfaceProps &props)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkBlendShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkColorFilterShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkColorShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkColor4Shader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkCoordClampShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkCTMShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkEmptyShader *shader, const GrFPArgs &, const SkShaders::MatrixRec &)
 
static bool GrFragmentProcessors::needs_subset (sk_sp< const SkImage > img, const SkRect &subset)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkImageShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkLocalMatrixShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkPerlinNoiseShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkPictureShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkRuntimeShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkTransformShader *shader, const GrFPArgs &, const SkShaders::MatrixRec &)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkTriColorShader *shader, const GrFPArgs &, const SkShaders::MatrixRec &)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkWorkingColorSpaceShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_gradient_fp (const SkConicalGradient *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_gradient_fp (const SkLinearGradient *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_gradient_fp (const SkRadialGradient *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_gradient_fp (const SkSweepGradient *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
static std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::make_shader_fp (const SkGradientBaseShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 
std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::Make (const SkShader *shader, const GrFPArgs &args, const SkMatrix &ctm)
 
std::unique_ptr< GrFragmentProcessorGrFragmentProcessors::Make (const SkShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
 

Macro Definition Documentation

◆ M [1/4]

#define M (   type)
Value:
case SkBlenderBase::BlenderType::k##type: \
return make_blender_fp(static_cast<const Sk##type##Blender*>(blender), \
std::move(srcFP), \
std::move(dstFP), \
fpArgs);
GLenum type
static std::unique_ptr< GrFragmentProcessor > make_blender_fp(const SkBlendModeBlender *blender, std::unique_ptr< GrFragmentProcessor > srcFP, std::unique_ptr< GrFragmentProcessor > dstFP, const GrFPArgs &fpArgs)

◆ M [2/4]

#define M (   type)
Value:
case SkColorFilterBase::Type::k##type: \
return make_colorfilter_fp(ctx, \
static_cast<const Sk##type##ColorFilter*>(cf), \
std::move(inputFP), \
dstColorInfo, \
props);
static GrFPResult make_colorfilter_fp(GrRecordingContext *context, const SkWorkingFormatColorFilter *filter, std::unique_ptr< GrFragmentProcessor > inputFP, const GrColorInfo &dstColorInfo, const SkSurfaceProps &props)
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)

◆ M [3/4]

#define M (   type)
Value:
case SkShaderBase::GradientType::k##type: \
return make_gradient_fp(static_cast<const Sk##type##Gradient*>(shader), args, mRec);
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static std::unique_ptr< GrFragmentProcessor > make_gradient_fp(const SkSweepGradient *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)
CanvasGradient Gradient
Definition: dart_ui.cc:57

◆ M [4/4]

#define M (   type)
Value:
case SkShaderBase::ShaderType::k##type: \
return make_shader_fp(static_cast<const Sk##type##Shader*>(base), args, mRec);
static std::unique_ptr< GrFragmentProcessor > make_shader_fp(const SkGradientBaseShader *shader, const GrFPArgs &args, const SkShaders::MatrixRec &mRec)