Bug 1333122 - Condition disabling of buffer-rotation on the layer tree rather than a compile-time flag. r?ethlin
MozReview-Commit-ID: EQ8TsjDlPW0
--- a/gfx/layers/RotatedBuffer.cpp
+++ b/gfx/layers/RotatedBuffer.cpp
@@ -422,18 +422,20 @@ RotatedContentBuffer::FlushBuffers()
RotatedContentBuffer::PaintState
RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer,
uint32_t aFlags)
{
PaintState result;
// We need to disable rotation if we're going to be resampled when
// drawing, because we might sample across the rotation boundary.
+ // Also disable buffer rotation when using webrender.
bool canHaveRotation = gfxPlatform::BufferRotationEnabled() &&
- !(aFlags & (PAINT_WILL_RESAMPLE | PAINT_NO_ROTATION));
+ !(aFlags & (PAINT_WILL_RESAMPLE | PAINT_NO_ROTATION)) &&
+ !(aLayer->Manager()->AsWebRenderLayerManager());
nsIntRegion validRegion = aLayer->GetValidRegion();
bool canUseOpaqueSurface = aLayer->CanUseOpaqueSurface();
ContentType layerContentType =
canUseOpaqueSurface ? gfxContentType::COLOR :
gfxContentType::COLOR_ALPHA;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4652,21 +4652,17 @@ pref("layers.tiles.edge-padding", true);
#endif
// Whether to animate simple opacity and transforms on the compositor
pref("layers.offmainthreadcomposition.async-animations", true);
// Whether to log information about off main thread animations to stderr
pref("layers.offmainthreadcomposition.log-animations", false);
-#ifdef MOZ_ENABLE_WEBRENDER
-pref("layers.bufferrotation.enabled", false);
-#else
pref("layers.bufferrotation.enabled", true);
-#endif
pref("layers.componentalpha.enabled", true);
pref("layers.draw-mask-debug", false);
pref("layers.advanced.border-layers", false);
pref("gfx.content.always-paint", false);