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
211 set[
i].fSrcAlphaType,
212 nullptr,
216 TextureOp::Saturate::kYes,
217 blendMode,
218 overallAA,
219 &quad,
220 nullptr);
221 sdc->addDrawOp(nullptr, std::move(op));
222 }
223 } else {
224 TextureOp::AddTextureSetOps(sdc.get(),
225 nullptr,
226 dContext,
228 requestedTotNumQuads,
229 requestedTotNumQuads,
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()
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=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