зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1155649 - XFlush at the end of frames when OMTC is enabled on Linux. r=jrmuizel
This commit is contained in:
Родитель
2289af5da8
Коммит
66177fae1c
|
@ -538,6 +538,13 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!mTxn->mPaints.empty()) {
|
||||
// With some platforms, telling the drawing backend that there will be no more
|
||||
// drawing for this frame helps with preventing command queues from spanning
|
||||
// across multiple frames.
|
||||
gfxPlatform::GetPlatform()->FlushContentDrawing();
|
||||
}
|
||||
|
||||
MOZ_LAYERS_LOG(("[LayersForwarder] destroying buffers..."));
|
||||
|
||||
MOZ_LAYERS_LOG(("[LayersForwarder] building transaction..."));
|
||||
|
|
|
@ -630,6 +630,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual void FlushContentDrawing() {}
|
||||
protected:
|
||||
gfxPlatform();
|
||||
virtual ~gfxPlatform();
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "gfxXlibSurface.h"
|
||||
#include "cairo-xlib.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/X11Util.h"
|
||||
|
||||
/* Undefine the Status from Xlib since it will conflict with system headers on OSX */
|
||||
#if defined(__APPLE__) && defined(Status)
|
||||
|
@ -81,6 +82,14 @@ gfxPlatformGtk::~gfxPlatformGtk()
|
|||
gfxPangoFontGroup::Shutdown();
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatformGtk::FlushContentDrawing()
|
||||
{
|
||||
if (UseXRender()) {
|
||||
XFlush(DefaultXDisplay());
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxPlatformGtk::CreateOffscreenSurface(const IntSize& size,
|
||||
gfxContentType contentType)
|
||||
|
|
|
@ -75,6 +75,11 @@ public:
|
|||
virtual bool IsFontFormatSupported(nsIURI *aFontURI,
|
||||
uint32_t aFormatFlags) override;
|
||||
|
||||
/**
|
||||
* Calls XFlush if xrender is enabled.
|
||||
*/
|
||||
virtual void FlushContentDrawing() override;
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
static void SetGdkDrawable(cairo_surface_t *target,
|
||||
GdkDrawable *drawable);
|
||||
|
|
Загрузка…
Ссылка в новой задаче