[mutter/gbsneto/software-picking: 65/67] clutter/stage: Stop toggling dither on pick()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/software-picking: 65/67] clutter/stage: Stop toggling dither on pick()
- Date: Wed, 30 Jan 2019 13:19:46 +0000 (UTC)
commit c5f7fc257b457b905cb29e9ff40bdf3eaa4f1d01
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jan 21 11:14:27 2019 -0200
clutter/stage: Stop toggling dither on pick()
ClutterStage disables dither when picking. Because that
toggles a global GL state, it flushes the journal and
issues all the batched draw calls, sending them to the
GPU to execute.
That pretty much defeats the purpose of the journal,
though, since every pick() call ends up sending commands
to the GPU.
Disabling dither makes most sense on RGB_565, a visual
that was commonly associated to old embedded hardware.
Nowadays, however, it isn't as much relevant as it was,
and picking without disabling dither works fine these
days.
Furthermore, it ultimately doesn't matter for when a
completely flush-less picking is achieved, since we won't
even touch OpenGL in these cases.
Thus, stop toggling dither off when picking.
clutter/clutter/clutter-stage.c | 8 --------
1 file changed, 8 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index dc64ddf3b..e023f4207 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1437,7 +1437,6 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
cairo_rectangle_int_t view_layout;
ClutterMainContext *context;
guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff };
- gboolean dither_enabled_save;
ClutterActor *retval;
gint dirty_x;
gint dirty_y;
@@ -1495,10 +1494,6 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_DEPTH,
1.0f, 1.0f, 1.0f, 1.0f);
- /* Disable dithering (if any) when doing the painting in pick mode */
- dither_enabled_save = cogl_framebuffer_get_dither_enabled (fb);
- cogl_framebuffer_set_dither_enabled (fb, FALSE);
-
/* Render the entire scence in pick mode - just single colored silhouette's
* are drawn offscreen (as we never swap buffers)
*/
@@ -1531,9 +1526,6 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
g_free (file_name);
}
- /* Restore whether GL_DITHER was enabled */
- cogl_framebuffer_set_dither_enabled (fb, dither_enabled_save);
-
if (G_LIKELY (!(clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)))
cogl_framebuffer_pop_clip (fb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]