Skip to content

Commit a36300c

Browse files
committed
Bug 1882828 - Ensure hard-coded batched texture uploads enabled state does not get overridden by pref. r=gfx-reviewers,lsalzman
Batched texture uploads are supposed to be hard-coded as enabled or disabled on certain platforms, and on other platforms controllable via a pref. However, a previous refactoring made it so that the hard-coded value is always being overridden by the pref (by checking whether the hard-coded value is set in the wrong place). As a consequence, batched texture uploads have been disabled on Mali-G devices, resulting in poor performance. This patch moves the check to the correct place, meaning the hard-coded value is respected once again. Differential Revision: https://phabricator.services.mozilla.com/D203145
1 parent 89dde15 commit a36300c

File tree

1 file changed

+4
-4
lines changed
  • gfx/wr/webrender/src/device

1 file changed

+4
-4
lines changed

gfx/wr/webrender/src/device/gl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,13 +1980,13 @@ impl Device {
19801980
}
19811981
}
19821982
Parameter::Bool(BoolParameter::BatchedUploads, enabled) => {
1983-
self.use_batched_texture_uploads = *enabled;
1984-
}
1985-
Parameter::Bool(BoolParameter::DrawCallsForTextureCopy, enabled) => {
19861983
if self.capabilities.requires_batched_texture_uploads.is_none() {
1987-
self.use_draw_calls_for_texture_copy = *enabled;
1984+
self.use_batched_texture_uploads = *enabled;
19881985
}
19891986
}
1987+
Parameter::Bool(BoolParameter::DrawCallsForTextureCopy, enabled) => {
1988+
self.use_draw_calls_for_texture_copy = *enabled;
1989+
}
19901990
Parameter::Int(IntParameter::BatchedUploadThreshold, threshold) => {
19911991
self.batched_upload_threshold = *threshold;
19921992
}

0 commit comments

Comments
 (0)