mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 500200. cairo-ddraw: Fallback if the source surface is larger than the maximum texture size. r=vlad
If the source surface is larger than the maximum texture size we fallback to software compositing instead of drawing the wrong things.
This commit is contained in:
parent
e505d83e7c
commit
6028d14806
@ -201,6 +201,9 @@ static EGLDisplay _cairo_ddraw_egl_dpy = EGL_NO_DISPLAY;
|
||||
static EGLContext _cairo_ddraw_egl_dummy_ctx = EGL_NO_CONTEXT;
|
||||
static EGLSurface _cairo_ddraw_egl_dummy_surface = EGL_NO_SURFACE;
|
||||
|
||||
static GLint _cairo_ddraw_ogl_max_texture_size;
|
||||
|
||||
|
||||
static cairo_status_t _cairo_ddraw_ogl_init(void);
|
||||
|
||||
static cairo_status_t
|
||||
@ -1505,6 +1508,10 @@ _cairo_ddraw_ogl_analyze_pattern (const cairo_pattern_t * pattern,
|
||||
|
||||
_cairo_surface_get_extents (surface, &extents);
|
||||
|
||||
if (extents.width > _cairo_ddraw_ogl_max_texture_size ||
|
||||
extents.height > _cairo_ddraw_ogl_max_texture_size)
|
||||
return CAIRO_DDRAW_OGL_TEXTURE_UNSUPPORTED;
|
||||
|
||||
if (extents_out)
|
||||
*extents_out = extents;
|
||||
|
||||
@ -1911,6 +1918,8 @@ _cairo_ddraw_ogl_init()
|
||||
|
||||
_cairo_ddraw_ogl_next_scratch_buffer = 0;
|
||||
|
||||
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &_cairo_ddraw_ogl_max_texture_size);
|
||||
|
||||
atexit (_cairo_ddraw_ogl_fini);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user