After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610679 - Fix COGL deprecation / update clutter to 1.1/1.2
Fix COGL deprecation / update clutter to 1.1/1.2
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 607007 611725 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-02-22 11:41 UTC by Bastien Nocera
Modified: 2010-03-11 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix deprecation (2.37 KB, patch)
2010-02-22 11:41 UTC, Bastien Nocera
needs-work Details | Review
Support and require Clutter 1.1 (7.95 KB, patch)
2010-02-23 17:53 UTC, Owen Taylor
committed Details | Review

Description Bastien Nocera 2010-02-22 11:41:02 UTC
Created attachment 154379 [details] [review]
fix deprecation

cogl_clip_push() is deprecated.
Comment 1 Florian Müllner 2010-02-22 12:00:25 UTC
*** Bug 607007 has been marked as a duplicate of this bug. ***
Comment 2 Florian Müllner 2010-02-22 12:02:51 UTC
Comment on attachment 154379 [details] [review]
fix deprecation

Citing Colin in bug 607007:
This patch needs to be part of a larger "Switch to clutter 1.2" patch, at a
minimum patching the configure.ac and jhbuild moduleset.
Comment 3 Bastien Nocera 2010-02-22 14:02:03 UTC
Well, at least it compiles on rawhide now...
Comment 4 Dan Winship 2010-02-22 14:22:26 UTC
we don't support building it other than via jhbuild though, so...
Comment 5 Florian Müllner 2010-02-22 14:28:53 UTC
(In reply to comment #3)
> Well, at least it compiles on rawhide now...

True, but as the recommended way to compile gnome-shell is using our jhbuild moduleset, we should not break that - as long as we officially depend on clutter-1.0 we cannot use cogl_clip_push_rectangle().

I'd expect the switch to happen rather soon though ...
Comment 6 Owen Taylor 2010-02-23 17:53:25 UTC
Created attachment 154528 [details] [review]
Support and require Clutter 1.1

- Specify a minimum version of clutter-1.1.10
 - Switch clutter branch in the moduleset to master
 - Replace deprecated cogl_texture/material_unref() with
   cogl_handle_unref()
 - Use cogl_clip_push_rectangle() rather than cogl_clip_push()
 - Replace cogl_check_extension() with strstr - should be
   accurate enough.

[ One blocking factor in landing this is some COGL bugs with
  GL_TEXTURE_RECTANGLE_ARB - I hope to get those fixed over
  the next few days.

  Beyond, that there are also a bunch of warnings of:

(mutter:13295): Clutter-WARNING **: The actor 'StDrawingArea' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

  These are "harmless" but make development pretty much impossible
  since you an't see the log output. StDrawingArea probably needs
  to be rewritten not to use ClutterCairoTexture, since it's sizing
  is interacting badly with CLutterTexture's sizing - does the
  texture drive the preferred size, or is the texture sized according
  to the size? And there are apparently also problems with
  StScrollbar/StScrollview. There are workarounds for that in
  MX, apparently. ]
Comment 7 Florian Müllner 2010-02-24 04:42:13 UTC
Review of attachment 154528 [details] [review]:

::: src/st/st-box-layout.c
@@ +1124,3 @@
+                              (int)content_box.y1,
+                              (int)content_box.x2 - (int)content_box.x1,
+                              (int)content_box.y2 - (int)content_box.y1);

cogl_clip_push() and cogl_clip_push_rectangle() differ in parameters: arguments 3 and 4 should be content_box.x2 and content_box.y2
Comment 8 drago01 2010-02-24 15:41:39 UTC
(In reply to comment #6)

> (mutter:13295): Clutter-WARNING **: The actor 'StDrawingArea' is currently
> inside an allocation cycle; calling clutter_actor_queue_relayout() is not
> recommended

I assume those are coming from the arrows in altTab ... queue_relayout() is only called to force a redraw of the arrow (to change the "highlight" state) ... we could just emit a redraw signal but this is kinda ugly.

(I have not actually tested it yet).
Comment 9 Owen Taylor 2010-02-24 16:47:41 UTC
(In reply to comment #8)
> (In reply to comment #6)
> 
> > (mutter:13295): Clutter-WARNING **: The actor 'StDrawingArea' is currently
> > inside an allocation cycle; calling clutter_actor_queue_relayout() is not
> > recommended
> 
> I assume those are coming from the arrows in altTab ... queue_relayout() is
> only called to force a redraw of the arrow (to change the "highlight" state)
> ... we could just emit a redraw signal but this is kinda ugly.

Actually, they are fundamentally coming from all uses of StDrawingArea. The basic problem is that when StDrawingArea.allocate() is called, it resizes the ClutterCairoTexture so the texture size matches the allocated size. This queues a relayout sinside ClutterTexture since ClutterTexture requests a size that matches the size of the texture.
Comment 10 Owen Taylor 2010-02-24 16:52:53 UTC
(In reply to comment #7)
> Review of attachment 154528 [details] [review]:
> 
> ::: src/st/st-box-layout.c
> @@ +1124,3 @@
> +                              (int)content_box.y1,
> +                              (int)content_box.x2 - (int)content_box.x1,
> +                              (int)content_box.y2 - (int)content_box.y1);
> 
> cogl_clip_push() and cogl_clip_push_rectangle() differ in parameters: arguments
> 3 and 4 should be content_box.x2 and content_box.y2

Good catch. Fixed locally.
Comment 11 Bastien Nocera 2010-02-25 11:03:43 UTC
(In reply to comment #10)
> (In reply to comment #7)
> > Review of attachment 154528 [details] [review] [details]:
> > 
> > ::: src/st/st-box-layout.c
> > @@ +1124,3 @@
> > +                              (int)content_box.y1,
> > +                              (int)content_box.x2 - (int)content_box.x1,
> > +                              (int)content_box.y2 - (int)content_box.y1);
> > 
> > cogl_clip_push() and cogl_clip_push_rectangle() differ in parameters: arguments
> > 3 and 4 should be content_box.x2 and content_box.y2
> 
> Good catch. Fixed locally.

Just like to point out that those changes were already in my patch...
Comment 12 Owen Taylor 2010-02-25 15:16:45 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #7)
> > > Review of attachment 154528 [details] [review] [details] [details]:
> > > 
> > > ::: src/st/st-box-layout.c
> > > @@ +1124,3 @@
> > > +                              (int)content_box.y1,
> > > +                              (int)content_box.x2 - (int)content_box.x1,
> > > +                              (int)content_box.y2 - (int)content_box.y1);
> > > 
> > > cogl_clip_push() and cogl_clip_push_rectangle() differ in parameters: arguments
> > > 3 and 4 should be content_box.x2 and content_box.y2
> > 
> > Good catch. Fixed locally.
> 
> Just like to point out that those changes were already in my patch...

Yeah, well, I already had Luis's patch from bug 607007 in my clutter-1.1 branch, so I started from that...
Comment 13 Florian Müllner 2010-03-03 18:10:33 UTC
*** Bug 611725 has been marked as a duplicate of this bug. ***
Comment 14 Colin Walters 2010-03-05 16:56:13 UTC
Review of attachment 154528 [details] [review]:

No comments other than Florian's; marking reviewed.