161 {
162 std::unique_ptr<skgpu::ganesh::SurfaceDrawContext> sdc =
new_SDC(dContext);
163
165
166 if (!allUniqueProxies) {
175 }
176
178
179 for (int i = 0; i < requestedTotNumQuads; ++i) {
180 if (!allUniqueProxies) {
181
182
183 set[i].fProxyView = i % 2 == 0 ? proxyViewA : proxyViewB;
184 } else {
185
190 }
191
195 set[i].fDstClipQuad =
nullptr;
196 set[i].fPreViewMatrix =
nullptr;
197 set[i].fColor = {1.f, 1.f, 1.f, 1.f};
198 set[i].fAAFlags = perQuadAA(i);
199 }
200
201 if (addOneByOne) {
202 for (int i = 0; i < requestedTotNumQuads; ++i) {
204
208
210 set[i].fProxyView,
211 set[i].fSrcAlphaType,
212 nullptr,
213 GrSamplerState::Filter::kNearest,
214 GrSamplerState::MipmapMode::kNone,
215 set[i].fColor,
216 TextureOp::Saturate::kYes,
217 blendMode,
218 overallAA,
219 &quad,
220 nullptr);
221 sdc->addDrawOp(nullptr, std::move(op));
222 }
223 } else {
225 nullptr,
226 dContext,
227 set,
228 requestedTotNumQuads,
229 requestedTotNumQuads,
230 GrSamplerState::Filter::kNearest,
231 GrSamplerState::MipmapMode::kNone,
232 TextureOp::Saturate::kYes,
233 blendMode,
234 overallAA,
237 nullptr);
238 }
239
240 auto opsTask = sdc->testingOnly_PeekLastOpsTask();
241 int actualNumOps = opsTask->numOpChains();
242
243 int actualTotNumQuads = 0;
244
247
248
249
250 expectedNumOps = requestedTotNumQuads;
251 }
253 ? TextureOp::ClassID()
255 for (int i = 0; i < actualNumOps; ++i) {
256 const GrOp* tmp = opsTask->getChain(i);
258 while (tmp) {
260 actualTotNumQuads += ((
const GrDrawOp*) tmp)->numQuads();
262 }
263 }
264
267
269
271}
static sk_sp< GrSurfaceProxy > create_proxy(GrRecordingContext *rContext)
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
bool dynamicStateArrayGeometryProcessorTextureSupport() const
GrDirectContextPriv priv()
std::unique_ptr< GrOp > Owner
GrOp * nextInChain() const
static GrQuad MakeFromRect(const SkRect &, const SkMatrix &)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
static constexpr Swizzle RGBA()
static void AddTextureSetOps(skgpu::ganesh::SurfaceDrawContext *, const GrClip *, GrRecordingContext *, GrTextureSetEntry[], int cnt, int proxyRunCnt, GrSamplerState::Filter, GrSamplerState::MipmapMode, Saturate, SkBlendMode, GrAAType, SkCanvas::SrcRectConstraint, const SkMatrix &viewMatrix, sk_sp< GrColorSpaceXform > textureXform)
static GrOp::Owner Make(GrRecordingContext *, GrSurfaceProxyView, SkAlphaType srcAlphaType, sk_sp< GrColorSpaceXform >, GrSamplerState::Filter, GrSamplerState::MipmapMode, const SkPMColor4f &, Saturate, SkBlendMode, GrAAType, DrawQuad *, const SkRect *subset=nullptr)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set