Commit Graph

2313 Commits

Author SHA1 Message Date
Adam Jackson
e5b0f474ab cogl: Remove some unused framebuffer API
https://gitlab.gnome.org/GNOME/mutter/merge_requests/913
2019-11-01 16:48:12 -04:00
Carlos Garnacho
d47324e8d7 cogl/egl: Explicitly initialize age variable
In case of error, it's untouched by EGL, which probably means an
invalid read.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/906
2019-10-30 17:09:03 +00:00
Carlos Garnacho
ee4638ef5c cogl/egl: Make surface current before querying buffer age
Unknown since when, we started deferring the eglMakeCurrent for the
current framebuffer till we started painting on it, which means we
are preparing for rendering a view without guarantees that the
framebuffer we will paint to is the current drawing surface for the
EGL context.

A fairly common case where that assumption will break is multimonitor
set ups, in this case we will be preparing to paint to a view while
the current draw surface is that of the previously rendered view's.

Mesa will in this case return EGL_BAD_SURFACE when querying the buffer
age, since the surface is not yet the current draw surface. This
makes us give up on buffer age checks, and paint the whole view. Since
the problem repeats when painting the next view, we are effectively
doing full-screen redraws on all monitors.

Since cogl usually works implicitly, and querying the buffer age is
meaningless if you're not meant to paint on a surface, make the surface
the current draw surface implicitly before querying the buffer age.

This brings us glorious partial invalidations back when several views
had to be repainted.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/906
2019-10-30 17:09:03 +00:00
Carlos Garnacho
6ee7c0f486 cogl/egl: Warn when we fail to query a buffer age.
In order to avoid log spamming, just warn once it starts to happen, not
on every frame for every onscreen. Just knowing that this is happening
is a hint that something's going wrong.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/906
2019-10-30 17:09:03 +00:00
Adam Jackson
f4f7e31303 cogl: Fix GLES2 fallback
Say you're using intel gen3, you poor soul. Your big-GL maxes out at 1.5
unless you use dirty tricks, but you do have GLES2. We try to fall back
to GLES in this case, but we only ever say eglBindAPI(EGL_OPENGL_API).
So when we go to do CreateContext, even though we think we've requested
GLES 2.0, the driver will compare that "2.0" against the maximum big-GL
version, and things will fail.

Fix this by binding EGL_OPENGL_ES_API before trying a GLES context.

https://gitlab.gnome.org/GNOME/mutter/issues/635
2019-10-30 16:14:32 +00:00
Thomas Hindoe Paaboel Andersen
7c036c5896 cogl: fix a compile warning
In find_onscreen_for_xid() we want to loop over the framebuffers
and skip any that is not onscreen.

The code today does this by negating the framebuffer type variable
and skipping if that equals COGL_FRAMEBUFFER_TYPE_ONSCREEN. This
actually works as the enum used will function as a boolean:

typedef enum _CoglFramebufferType {
  COGL_FRAMEBUFFER_TYPE_ONSCREEN,
  COGL_FRAMEBUFFER_TYPE_OFFSCREEN
} CoglFramebufferType;

But it is a bit weird logic and fragile if more types are added.
(not that I can think of any different type...)

To simplify this, and to silence a warning in clang this patch just
changes it to a != test.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/905
2019-10-30 16:02:45 +00:00
Adam Jackson
793c2ac58d cogl: Remove unused cogl-deprecated.h
https://gitlab.gnome.org/GNOME/mutter/merge_requests/896
2019-10-30 02:28:40 +00:00
Adam Jackson
13d9e4db30 cogl: Remove unused cogl/cogl-pango.h
https://gitlab.gnome.org/GNOME/mutter/merge_requests/896
2019-10-30 02:28:40 +00:00
Adam Jackson
e84dbd7faf cogl: Remove unused CoglPipelineLightingState
https://gitlab.gnome.org/GNOME/mutter/merge_requests/904
2019-10-29 16:00:02 -04:00
Adam Jackson
711023ea93 cogl: Remove unused COGL_PIPELINE_STATE_LIGHTING
https://gitlab.gnome.org/GNOME/mutter/merge_requests/904
2019-10-29 16:00:01 -04:00
Adam Jackson
468dc99dc9 cogl: Remove unused pipeline lighting API
https://gitlab.gnome.org/GNOME/mutter/merge_requests/904
2019-10-29 15:59:59 -04:00
Adam Jackson
6b8ee80fd0 cogl: Remove unused deprecated material lighting API
https://gitlab.gnome.org/GNOME/mutter/merge_requests/904
2019-10-29 15:59:53 -04:00
Adam Jackson
17e39ad79c cogl: Remove support for cogl.conf
There are still environment variables for these controls, but having
them in a config file doesn't really make sense for mutter. Even if it
did we probably don't want to be parsing the same file as some
standalone version of cogl.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/902
2019-10-29 19:25:37 +00:00
Adam Jackson
3f9c5d04d4 cogl: Remove old workaround for software Mesa
The comment says this was fixed in 10.1, which is over five years old
now. Please use a newer Mesa already.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/900
2019-10-29 12:42:30 -04:00
Adam Jackson
3e5960b5a2 cogl: Remove unused cogl_egl_context_get_egl_context
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:53:03 -04:00
Adam Jackson
b294e62aed cogl: Remove unused cogl_glx_context_get_glx_context
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:53:01 -04:00
Adam Jackson
c63f54b7a7 cogl: Remove unused cogl_texture_pixmap_x11_set_damage_object
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:53:00 -04:00
Adam Jackson
3186e45ae5 cogl: Remove unused cogl_xlib_renderer_get_visual_info
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:59 -04:00
Adam Jackson
ed7afd9e80 cogl: Remove unused cogl_x11_onscreen_set_foreign_window_xid
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:57 -04:00
Adam Jackson
683f18639e cogl: Remove unused cogl_x11_onscreen_get_visual_xid
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:56 -04:00
Adam Jackson
e17494f3bd cogl: Inline cogl_xlib_renderer_set_event_retrieval_enabled into its one caller
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:54 -04:00
Adam Jackson
c36c865987 cogl: Remove unused _cogl_xlib_renderer_get_dispatch_timeout
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:53 -04:00
Adam Jackson
a99f579127 cogl: Remove unused cogl_check_extension and cogl_clutter_check_extension
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:51 -04:00
Adam Jackson
acc7b83322 cogl: Remove the stub winsys
It's not useful and supporting it leaks into the API in other weird
ways.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:49 -04:00
Adam Jackson
95662fd3d8 cogl: Remove unused cogl_xlib_renderer_get_visual_info
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:47 -04:00
Adam Jackson
b3980f7a94 cogl: Move _cogl_xlib_get_damage_base near its only consumer
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:46 -04:00
Adam Jackson
ac626f7334 cogl: Remove unused API from cogl-xlib
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
2019-10-24 16:52:43 -04:00
Adam Jackson
d6bf4800ed cogl: Remove unused _cogl_matrix_entry_flush_to_gl_builtins
https://gitlab.gnome.org/GNOME/mutter/merge_requests/880
2019-10-22 19:44:54 +00:00
Adam Jackson
bd1630a12c cogl: Remove unused CoglFeatureFlags
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
67d5ebb187 cogl: Remove unused COGL_FEATURE_PBOS
Almost there.  The CoglFeatureFlags type is changed to "int"
momentarily.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
ba7b8a5de3 cogl: Remove unused COGL_FEATURE_TEXTURE_YUV
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
f01db80387 cogl: Remove unused COGL_FEATURE_TEXTURE_READ_PIXELS
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
673f4295e8 cogl: Remove unused COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE
This is a _little_ strange, as we still fill in the vtable slot for
glRenderbufferStorageMultisampleIMG, and can in principle still call it.
But that feature was weird to begin with as we were only checking for
that function in big-GL contexts despite that its extension is for GLES.
I'll leave cleaning that up to a future pass.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
1f04b1ae69 cogl: Remove unused COGL_FEATURE_OFFSCREEN_MULTISAMPLE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
26a7387f40 cogl: Remove unused COGL_FEATURE_FOUR_CLIP_PLANES
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
bd5266a05e cogl: Remove unused COGL_FEATURE_STENCIL_BUFFER
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
eb3ffeff0a cogl: Remove unused COGL_FEATURE_UNSIGNED_INT_INDICES
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
0731eb629c cogl: Remove unused COGL_FEATURE_MAP_BUFFER_FOR_{READ,WRITE}
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
34a38827b7 cogl: Remove unused COGL_FEATURE_ID_ONSCREEN_MULTIPLE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
3076895e98 cogl: Remove unused COGL_FEATURE_ONSCREEN_MULTIPLE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
0e4c23c985 cogl: Remove unused depth texture API
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
fb49e9def7 cogl: Remove unused COGL_FEATURE_ID_DEPTH_TEXTURE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
45e77c1d87 cogl: Remove unused COGL_FEATURE_DEPTH_TEXTURE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
cf107c89b8 cogl: Remove always-set COGL_FEATURE_OFFSCREEN
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
6a8830a551 cogl: Remove always-set COGL_FEATURE_ID_OFFSCREEN
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
4523251849 cogl: Require {EXT,ARB}_framebuffer_object in the GL driver
This was only promoted to core in 3.0, but Mesa's supported it
unconditionally since around 7.0 even in 2.1 contexts, so this is not a
particularly onerous requirement.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
5f4e8789df cogl: Remove unused COGL_FEATURE_POINT_SPRITE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
eaf0aa1f07 cogl: Remove unused COGL_FEATURE_DEPTH_RANGE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
96da0c60bd cogl: Remove always-set COGL_FEATURE_ID_POINT_SPRITE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
da36575d7f cogl: Remove always-set COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00