mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184534 - Add support for target size retrieval to GLX backend. r=jgilbert
This commit is contained in:
parent
170612bcd9
commit
e27a48201a
@ -32,6 +32,7 @@
|
||||
#define MOZ_GL_DEBUG 1
|
||||
#endif
|
||||
|
||||
#include "../../mfbt/Maybe.h"
|
||||
#include "../../mfbt/RefPtr.h"
|
||||
#include "../../mfbt/UniquePtr.h"
|
||||
|
||||
@ -3250,6 +3251,13 @@ public:
|
||||
|
||||
GLuint GetFB();
|
||||
|
||||
/*
|
||||
* Retrieves the size of the native windowing system drawable.
|
||||
*/
|
||||
virtual Maybe<gfx::IntSize> GetTargetSize() {
|
||||
return Maybe<gfx::IntSize>();
|
||||
};
|
||||
|
||||
private:
|
||||
void GetShaderPrecisionFormatNonES2(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
|
||||
switch (precisiontype) {
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
|
||||
virtual bool SwapBuffers() override;
|
||||
|
||||
virtual Maybe<gfx::IntSize> GetTargetSize() override;
|
||||
|
||||
private:
|
||||
friend class GLContextProviderGLX;
|
||||
|
||||
|
@ -912,6 +912,20 @@ GLContextGLX::SwapBuffers()
|
||||
return true;
|
||||
}
|
||||
|
||||
Maybe<gfx::IntSize>
|
||||
GLContextGLX::GetTargetSize()
|
||||
{
|
||||
unsigned int width = 0, height = 0;
|
||||
Window root;
|
||||
int x, y;
|
||||
unsigned int border, depth;
|
||||
XGetGeometry(mDisplay, mDrawable, &root, &x, &y, &width, &height,
|
||||
&border, &depth);
|
||||
Maybe<gfx::IntSize> size;
|
||||
size.emplace(width, height);
|
||||
return size;
|
||||
}
|
||||
|
||||
GLContextGLX::GLContextGLX(
|
||||
const SurfaceCaps& caps,
|
||||
GLContext* shareContext,
|
||||
|
Loading…
Reference in New Issue
Block a user