зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1534557 - Implement GtkCompositorWidget::GetEGLNativeWindow() for GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D23106 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f42cec8f44
Коммит
414520a0b9
|
@ -6,9 +6,8 @@
|
|||
#if defined(MOZ_WIDGET_GTK)
|
||||
# define GET_NATIVE_WINDOW_FROM_REAL_WIDGET(aWidget) \
|
||||
((EGLNativeWindowType)aWidget->GetNativeData(NS_NATIVE_EGL_WINDOW))
|
||||
# define GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET(aWidget) \
|
||||
((EGLNativeWindowType)aWidget->RealWidget()->GetNativeData( \
|
||||
NS_NATIVE_EGL_WINDOW))
|
||||
# define GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET(aWidget) \
|
||||
(aWidget->AsX11()->GetEGLNativeWindow())
|
||||
#elif defined(MOZ_WIDGET_ANDROID)
|
||||
# define GET_NATIVE_WINDOW_FROM_REAL_WIDGET(aWidget) \
|
||||
((EGLNativeWindowType)aWidget->GetNativeData(NS_JAVA_SURFACE))
|
||||
|
@ -73,6 +72,10 @@
|
|||
#include "ScopedGLHelpers.h"
|
||||
#include "TextureImageEGL.h"
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
# include "mozilla/widget/GtkCompositorWidget.h"
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WAYLAND)
|
||||
# include "nsAutoPtr.h"
|
||||
# include "nsDataHashtable.h"
|
||||
|
|
|
@ -103,5 +103,9 @@ uintptr_t GtkCompositorWidget::GetWidgetKey() {
|
|||
return reinterpret_cast<uintptr_t>(mWidget);
|
||||
}
|
||||
|
||||
EGLNativeWindowType GtkCompositorWidget::GetEGLNativeWindow() {
|
||||
return (EGLNativeWindowType)mWidget->GetNativeData(NS_NATIVE_EGL_WINDOW);
|
||||
}
|
||||
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef widget_gtk_GtkCompositorWidget_h
|
||||
#define widget_gtk_GtkCompositorWidget_h
|
||||
|
||||
#include "GLDefs.h"
|
||||
#include "mozilla/widget/CompositorWidget.h"
|
||||
#include "WindowSurfaceProvider.h"
|
||||
|
||||
|
@ -62,6 +63,8 @@ class GtkCompositorWidget : public CompositorWidget,
|
|||
Display* XDisplay() const { return mXDisplay; }
|
||||
Window XWindow() const { return mXWindow; }
|
||||
|
||||
EGLNativeWindowType GetEGLNativeWindow();
|
||||
|
||||
// PlatformCompositorWidgetDelegate Overrides
|
||||
|
||||
void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче