Bug 1802625 - Allow strokes to be cached as textures even when GPU stroking is off. r=jrmuizel

This fixes an incidental bug with the pref to turn off GPU stroking. It's not supposed to disable
caching strokes as textures. This allows that to work again even if prefed off.

Differential Revision: https://phabricator.services.mozilla.com/D163307
This commit is contained in:
Lee Salzman
2022-11-29 20:26:41 +00:00
parent 58f6523296
commit 70d581c04f

View File

@@ -2536,9 +2536,7 @@ void PathCache::ClearVertexRanges() {
inline bool DrawTargetWebgl::ShouldAccelPath(
const DrawOptions& aOptions, const StrokeOptions* aStrokeOptions) {
return mWebglValid && SupportsDrawOptions(aOptions) &&
(!aStrokeOptions || mSharedContext->mPathAccelStroke) &&
PrepareContext();
return mWebglValid && SupportsDrawOptions(aOptions) && PrepareContext();
}
bool DrawTargetWebgl::SharedContext::DrawPathAccel(
@@ -2634,7 +2632,7 @@ bool DrawTargetWebgl::SharedContext::DrawPathAccel(
}
if (mPathVertexCapacity > 0 && !handle && entry && !aShadow &&
SupportsPattern(aPattern) &&
SupportsPattern(aPattern) && (!aStrokeOptions || mPathAccelStroke) &&
entry->GetPath().mPath.num_types <= mPathMaxComplexity) {
if (entry->GetVertexRange().IsValid()) {
// If there is a valid cached vertex data in the path vertex buffer, then