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
@ -314,12 +314,14 @@ create_offscreen_framebuffer (ClutterStageView *view,
|
|||||||
{
|
{
|
||||||
ClutterStageViewPrivate *priv =
|
ClutterStageViewPrivate *priv =
|
||||||
clutter_stage_view_get_instance_private (view);
|
clutter_stage_view_get_instance_private (view);
|
||||||
|
CoglPixelFormat format;
|
||||||
CoglContext *cogl_context;
|
CoglContext *cogl_context;
|
||||||
CoglOffscreen *framebuffer;
|
CoglOffscreen *framebuffer;
|
||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
|
format = cogl_framebuffer_get_internal_format (priv->framebuffer);
|
||||||
cogl_context = cogl_framebuffer_get_context (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);
|
cogl_primitive_texture_set_auto_mipmap (texture, FALSE);
|
||||||
|
|
||||||
if (!cogl_texture_allocate (texture, error))
|
if (!cogl_texture_allocate (texture, error))
|
||||||
|
@ -146,9 +146,6 @@ void
|
|||||||
_cogl_framebuffer_set_internal_format (CoglFramebuffer *framebuffer,
|
_cogl_framebuffer_set_internal_format (CoglFramebuffer *framebuffer,
|
||||||
CoglPixelFormat internal_format);
|
CoglPixelFormat internal_format);
|
||||||
|
|
||||||
CoglPixelFormat
|
|
||||||
cogl_framebuffer_get_internal_format (CoglFramebuffer *framebuffer);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
_cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
||||||
unsigned long buffers,
|
unsigned long buffers,
|
||||||
|
@ -1123,4 +1123,13 @@ cogl_framebuffer_flush (CoglFramebuffer *framebuffer);
|
|||||||
COGL_EXPORT CoglTimestampQuery *
|
COGL_EXPORT CoglTimestampQuery *
|
||||||
cogl_framebuffer_create_timestamp_query (CoglFramebuffer *framebuffer);
|
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
|
G_END_DECLS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user