clutter/stage-view: Make shadow fbs use the onscreen pixel format
We'd use the "default" format otherwise; once the onscreen gets something other than the hard coded format, we'll want to make sure we use the same here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3433>
This commit is contained in:
parent
42d4287f20
commit
2ae5af62ea
3 changed files with 12 additions and 4 deletions
|
@ -314,12 +314,14 @@ create_offscreen_framebuffer (ClutterStageView *view,
|
|||
{
|
||||
ClutterStageViewPrivate *priv =
|
||||
clutter_stage_view_get_instance_private (view);
|
||||
CoglPixelFormat format;
|
||||
CoglContext *cogl_context;
|
||||
CoglOffscreen *framebuffer;
|
||||
CoglTexture *texture;
|
||||
|
||||
format = cogl_framebuffer_get_internal_format (priv->framebuffer);
|
||||
cogl_context = cogl_framebuffer_get_context (priv->framebuffer);
|
||||
texture = cogl_texture_2d_new_with_size (cogl_context, width, height);
|
||||
texture = cogl_texture_2d_new_with_format (cogl_context, width, height, format);
|
||||
cogl_primitive_texture_set_auto_mipmap (texture, FALSE);
|
||||
|
||||
if (!cogl_texture_allocate (texture, error))
|
||||
|
|
|
@ -146,9 +146,6 @@ void
|
|||
_cogl_framebuffer_set_internal_format (CoglFramebuffer *framebuffer,
|
||||
CoglPixelFormat internal_format);
|
||||
|
||||
CoglPixelFormat
|
||||
cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer);
|
||||
|
||||
void
|
||||
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
||||
unsigned long buffers,
|
||||
|
|
|
@ -1123,4 +1123,13 @@ cogl_framebuffer_flush (CoglFramebuffer *framebuffer);
|
|||
COGL_EXPORT CoglTimestampQuery *
|
||||
cogl_framebuffer_create_timestamp_query (CoglFramebuffer *framebuffer);
|
||||
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_get_internal_format: (skip)
|
||||
*
|
||||
* Returns the pixel format used internally by the framebuffer.
|
||||
*/
|
||||
COGL_EXPORT CoglPixelFormat
|
||||
cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Reference in a new issue