mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1258086 - Clear unbuffered SHM images with a 32-bit visual before drawing with the basic layer manager. r=lsalzman
MozReview-Commit-ID: 8XgVwvBDZ3X --HG-- extra : rebase_source : ba0ed32c5b8241fa6bf6300a8fa97ad71a236c1a
This commit is contained in:
parent
a9cd8f1af3
commit
28d156be0f
@ -2282,6 +2282,17 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
bool painted = false;
|
||||
{
|
||||
if (GetLayerManager()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||
GdkScreen *screen = gdk_window_get_screen(mGdkWindow);
|
||||
if (GetTransparencyMode() == eTransparencyTransparent &&
|
||||
layerBuffering == BufferMode::BUFFER_NONE &&
|
||||
gdk_screen_is_composited(screen) &&
|
||||
gdk_window_get_visual(mGdkWindow) ==
|
||||
gdk_screen_get_rgba_visual(screen)) {
|
||||
// If our draw target is unbuffered and we use an alpha channel,
|
||||
// clear the image beforehand to ensure we don't get artifacts from a
|
||||
// reused SHM image. See bug 1258086.
|
||||
dt->ClearRect(Rect(boundsRect));
|
||||
}
|
||||
AutoLayerManagerSetup setupLayerManager(this, ctx, layerBuffering);
|
||||
painted = listener->PaintWindow(this, region);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user