void initBatchTracker(const GrXPOverridesForBatch& overrides) override { // Handle any color overrides if (!overrides.readsColor()) { fGeoData[0].fColor = GrColor_ILLEGAL; } overrides.getOverrideColorIfSet(&fGeoData[0].fColor); // setup batch properties fBatch.fColorIgnored = !overrides.readsColor(); fBatch.fUsesLocalCoords = overrides.readsLocalCoords(); fBatch.fCoverageIgnored = !overrides.readsCoverage(); }
void initBatchTracker(const GrXPOverridesForBatch& overrides) override { // Handle any color overrides if (!overrides.readsColor()) { fGeoData[0].fColor = GrColor_ILLEGAL; } overrides.getOverrideColorIfSet(&fGeoData[0].fColor); // setup batch properties fBatch.fColorIgnored = !overrides.readsColor(); fBatch.fColor = fGeoData[0].fColor; fBatch.fUsesLocalCoords = overrides.readsLocalCoords(); fBatch.fCoverageIgnored = !overrides.readsCoverage(); fBatch.fLinesOnly = SkPath::kLine_SegmentMask == fGeoData[0].fPath.getSegmentMasks(); fBatch.fCanTweakAlphaForCoverage = overrides.canTweakAlphaForCoverage(); }
void initBatchTracker(const GrXPOverridesForBatch& overrides) override { // Handle any color overrides if (!overrides.readsColor()) { fColor = GrColor_ILLEGAL; } overrides.getOverrideColorIfSet(&fColor); fPipelineInfo = overrides; }
void GrDrawAtlasBatch::initBatchTracker(const GrXPOverridesForBatch& overrides) { SkASSERT(fGeoData.count() == 1); // Handle any color overrides if (!overrides.readsColor()) { fGeoData[0].fColor = GrColor_ILLEGAL; } if (overrides.getOverrideColorIfSet(&fGeoData[0].fColor) && fHasColors) { size_t vertexStride = sizeof(SkPoint) + sizeof(SkPoint) + (this->hasColors() ? sizeof(GrColor) : 0); uint8_t* currVertex = fGeoData[0].fVerts.begin(); for (int i = 0; i < 4*fQuadCount; ++i) { *(reinterpret_cast<GrColor*>(currVertex + sizeof(SkPoint))) = fGeoData[0].fColor; currVertex += vertexStride; } } // setup batch properties fColorIgnored = !overrides.readsColor(); fColor = fGeoData[0].fColor; // We'd like to assert this, but we can't because of GLPrograms test //SkASSERT(init.readsLocalCoords()); fCoverageIgnored = !overrides.readsCoverage(); }