Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Namespaces | Macros | Functions
KeyHelpers.cpp File Reference
#include "src/gpu/graphite/KeyHelpers.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkM44.h"
#include "include/core/SkScalar.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/gpu/graphite/Surface.h"
#include "src/base/SkHalf.h"
#include "src/core/SkBlendModeBlender.h"
#include "src/core/SkBlenderBase.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkDebugUtils.h"
#include "src/core/SkRuntimeBlender.h"
#include "src/core/SkRuntimeEffectPriv.h"
#include "src/core/SkYUVMath.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/Blend.h"
#include "src/gpu/DitherUtils.h"
#include "src/gpu/Swizzle.h"
#include "src/gpu/graphite/Caps.h"
#include "src/gpu/graphite/DrawContext.h"
#include "src/gpu/graphite/Image_Base_Graphite.h"
#include "src/gpu/graphite/Image_Graphite.h"
#include "src/gpu/graphite/Image_YUVA_Graphite.h"
#include "src/gpu/graphite/KeyContext.h"
#include "src/gpu/graphite/Log.h"
#include "src/gpu/graphite/PaintParams.h"
#include "src/gpu/graphite/PaintParamsKey.h"
#include "src/gpu/graphite/PipelineData.h"
#include "src/gpu/graphite/ReadSwizzle.h"
#include "src/gpu/graphite/RecorderPriv.h"
#include "src/gpu/graphite/ResourceProvider.h"
#include "src/gpu/graphite/RuntimeEffectDictionary.h"
#include "src/gpu/graphite/ShaderCodeDictionary.h"
#include "src/gpu/graphite/Surface_Graphite.h"
#include "src/gpu/graphite/Texture.h"
#include "src/gpu/graphite/TextureProxy.h"
#include "src/gpu/graphite/TextureProxyView.h"
#include "src/gpu/graphite/TextureUtils.h"
#include "src/gpu/graphite/Uniform.h"
#include "src/gpu/graphite/UniformManager.h"
#include "src/image/SkImage_Base.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/SkPerlinNoiseShaderType.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/SkLinearGradient.h"
#include "src/shaders/gradients/SkRadialGradient.h"
#include "src/shaders/gradients/SkSweepGradient.h"

Go to the source code of this file.

Namespaces

namespace  skgpu
 
namespace  skgpu::graphite
 

Macros

#define VALIDATE_UNIFORMS(gatherer, dict, codeSnippetID)    SkDEBUGCODE(UniformExpectationsValidator uev(gatherer, dict->getUniforms(codeSnippetID));)
 
#define M(type)
 
#define M(type)
 
#define M(type)
 
#define M(type)
 
#define M(type)
 

Functions

static int skgpu::graphite::write_color_and_offset_bufdata (int numStops, const SkPMColor4f *colors, const float *offsets, const SkGradientBaseShader *shader, PipelineDataGatherer *gatherer)
 
static bool skgpu::graphite::can_do_yuv_tiling_in_hw (const Caps *caps, const YUVImageShaderBlock::ImageData &imgData)
 
void skgpu::graphite::AddBlendModeColorFilter (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, SkBlendMode bm, const SkPMColor4f &srcColor)
 
static bool skgpu::graphite::skdata_matches (const SkData *a, const SkData *b)
 
static void skgpu::graphite::gather_runtime_effect_uniforms (const KeyContext &keyContext, const SkRuntimeEffect *effect, SkSpan< const Uniform > graphiteUniforms, const SkData *uniformData, PipelineDataGatherer *gatherer)
 
void skgpu::graphite::AddToKey (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkBlender *blender)
 
void skgpu::graphite::NotifyImagesInUse (Recorder *recorder, DrawContext *drawContext, const SkBlender *blender)
 
static SkPMColor4f skgpu::graphite::map_color (const SkColor4f &c, SkColorSpace *src, SkColorSpace *dst)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkBlendModeColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkColorSpaceXformColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *keyBuilder, PipelineDataGatherer *gatherer, const SkComposeColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkGaussianColorFilter *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkMatrixColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkRuntimeColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkTableColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkWorkingFormatColorFilter *filter)
 
void skgpu::graphite::AddToKey (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkColorFilter *filter)
 
void skgpu::graphite::NotifyImagesInUse (Recorder *recorder, DrawContext *drawContext, const SkColorFilter *filter)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkBlendShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkBlendShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkCTMShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkCTMShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkColorShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkColorShader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkColor4Shader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkColor4Shader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkColorFilterShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkColorFilterShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkCoordClampShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkCoordClampShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkEmptyShader *)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkEmptyShader *)
 
static void skgpu::graphite::add_yuv_image_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkImageShader *origShader, sk_sp< const SkImage > imageToDraw, SkSamplingOptions sampling)
 
static skgpu::graphite::ReadSwizzle skgpu::graphite::swizzle_class_to_read_enum (const skgpu::Swizzle &swizzle)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkImageShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkImageShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkLocalMatrixShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkLocalMatrixShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkPerlinNoiseShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkPerlinNoiseShader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkPictureShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkPictureShader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkRuntimeShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkRuntimeShader *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkTransformShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkTransformShader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkTriColorShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkTriColorShader *)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkWorkingColorSpaceShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *recorder, DrawContext *drawContext, const SkWorkingColorSpaceShader *shader)
 
static SkBitmap skgpu::graphite::create_color_and_offset_bitmap (int numStops, const SkPMColor4f *colors, const float *offsets)
 
static void skgpu::graphite::make_interpolated_to_dst (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const GradientShaderBlocks::GradientData &gradData, const SkGradientShader::Interpolation &interp, SkColorSpace *intermediateCS)
 
static void skgpu::graphite::add_gradient_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkGradientBaseShader *shader, SkPoint point0, SkPoint point1, float radius0, float radius1, float bias, float scale)
 
static void skgpu::graphite::add_gradient_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkConicalGradient *shader)
 
static void skgpu::graphite::add_gradient_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkLinearGradient *shader)
 
static void skgpu::graphite::add_gradient_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkRadialGradient *shader)
 
static void skgpu::graphite::add_gradient_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkSweepGradient *shader)
 
static void skgpu::graphite::add_to_key (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkGradientBaseShader *shader)
 
static void skgpu::graphite::notify_in_use (Recorder *, DrawContext *, const SkGradientBaseShader *)
 
void skgpu::graphite::AddToKey (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, const SkShader *shader)
 
void skgpu::graphite::NotifyImagesInUse (Recorder *recorder, DrawContext *drawContext, const SkShader *shader)
 

Macro Definition Documentation

◆ M [1/5]

#define M (   type)
Value:
case SkBlenderBase::BlenderType::k##type: \
add_to_key(keyContext, \
gatherer, \
static_cast<const Sk##type##Blender*>(blender)); \
return;
GLenum type

◆ M [2/5]

#define M (   type)
Value:
case SkColorFilterBase::Type::k##type: \
add_to_key(keyContext, \
gatherer, \
static_cast<const Sk##type##ColorFilter*>(filter)); \
return;
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)

◆ M [3/5]

#define M (   type)
Value:
case SkShaderBase::GradientType::k##type: \
add_gradient_to_key(keyContext, \
gatherer, \
static_cast<const Sk##type##Gradient*>(shader)); \
return;
CanvasGradient Gradient
Definition: dart_ui.cc:57

◆ M [4/5]

#define M (   type)
Value:
case SkShaderBase::ShaderType::k##type: \
add_to_key(keyContext, \
gatherer, \
static_cast<const Sk##type##Shader*>(shader)); \
return;

◆ M [5/5]

#define M (   type)
Value:
case SkShaderBase::ShaderType::k##type: \
notify_in_use(recorder, \
drawContext, \
static_cast<const Sk##type##Shader*>(shader)); \
return;

◆ VALIDATE_UNIFORMS

#define VALIDATE_UNIFORMS (   gatherer,
  dict,
  codeSnippetID 
)     SkDEBUGCODE(UniformExpectationsValidator uev(gatherer, dict->getUniforms(codeSnippetID));)

Definition at line 84 of file KeyHelpers.cpp.