|
static void | Draw (const skif::Context &ctx, SkDevice *device, const skif::FilterResult &image, bool preserveDeviceState) |
|
static sk_sp< SkShader > | AsShader (const skif::Context &ctx, const skif::FilterResult &image, const skif::LayerSpace< SkIRect > &sampleBounds) |
|
static sk_sp< SkShader > | StrictShader (const skif::Context &ctx, const skif::FilterResult &image) |
|
static skif::FilterResult | Rescale (const skif::Context &ctx, const skif::FilterResult &image, const skif::LayerSpace< SkSize > scale) |
|
static void | TrackStats (skif::Context *ctx, skif::Stats *stats) |
|
static bool | IsIntegerTransform (const skif::FilterResult &image) |
|
static std::optional< std::pair< float, float > > | DeferredScaleFactors (const skif::FilterResult &image) |
|
static bool | IsShaderTilingExpected (const skif::Context &ctx, const skif::FilterResult &image) |
|
static bool | IsShaderClampingExpected (const skif::Context &ctx, const skif::FilterResult &image) |
|
Definition at line 78 of file FilterResultTest.cpp.
◆ AsShader()
Definition at line 88 of file FilterResultTest.cpp.
90 {
91 return image.asShader(ctx, FilterResult::kDefaultSampling,
93 }
sk_sp< const SkImage > image
◆ DeferredScaleFactors()
static std::optional< std::pair< float, float > > FilterResultTestAccess::DeferredScaleFactors |
( |
const skif::FilterResult & |
image | ) |
|
|
inlinestatic |
Definition at line 130 of file FilterResultTest.cpp.
131 {
132 float scaleFactors[2];
134 return {{scaleFactors[0], scaleFactors[1]}};
135 } else {
136 return {};
137 }
138 }
bool getMinMaxScales(SkScalar scaleFactors[2]) const
◆ Draw()
◆ IsIntegerTransform()
static bool FilterResultTestAccess::IsIntegerTransform |
( |
const skif::FilterResult & |
image | ) |
|
|
inlinestatic |
Definition at line 123 of file FilterResultTest.cpp.
123 {
125 return m.isTranslate() &&
128 }
static bool SkScalarIsInt(SkScalar x)
◆ IsShaderClampingExpected()
Definition at line 161 of file FilterResultTest.cpp.
162 {
164 if (analysis & BoundsAnalysis::kHasLayerFillingEffect) {
165
166
170 return true;
171 } else {
172
174 return false;
175 }
176 }
177
178
180 }
static bool IsShaderTilingExpected(const skif::Context &ctx, const skif::FilterResult &image)
const LayerSpace< SkIRect > & desiredOutput() const
constexpr SkColor4f kTransparent
◆ IsShaderTilingExpected()
Definition at line 140 of file FilterResultTest.cpp.
141 {
143 return false;
144 }
147 return false;
148 }
150 if (!(analysis & BoundsAnalysis::kHasLayerFillingEffect)) {
151 return false;
152 }
153
154
155
156
157
158 return true;
159 }
◆ Rescale()
◆ StrictShader()
Definition at line 95 of file FilterResultTest.cpp.
96 {
98 if (analysis & FilterResult::BoundsAnalysis::kRequiresLayerCrop) {
99
100
101 return nullptr;
102 } else {
103
104 analysis |= BoundsAnalysis::kDstBoundsNotCovered;
105 analysis |= BoundsAnalysis::kRequiresShaderTiling;
107 analysis |= BoundsAnalysis::kRequiresDecalInLayerSpace;
108 }
109 return image.getAnalyzedShaderView(ctx,
image.sampling(), analysis);
110 }
111 }
◆ TrackStats()
The documentation for this class was generated from the following file: