Merge lp:~sil2100/compiz-core/fglrx_final_fix into lp:compiz-core/0.9.8

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 3109
Proposed branch: lp:~sil2100/compiz-core/fglrx_final_fix
Merge into: lp:compiz-core/0.9.8
Diff against target: 109 lines (+18/-42)
2 files modified
plugins/decor/src/decor.cpp (+18/-40)
plugins/decor/src/decor.h (+0/-2)
To merge this branch: bzr merge lp:~sil2100/compiz-core/fglrx_final_fix
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Sam Spilsbury Approve
Review via email: mp+102824@code.launchpad.net

Commit message

Reverting the introduction of bindTexture - we don't need it, since the fix is actually a ONE LINER! Thanks Sam!

Description of the change

Do I even have to say anything besides: THE fix for LP: #770283 ;) ?

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

fyi that's the fix

87 }
88 }
89 - return;
90 }
91 }
92 }

One line wonders ftw.

review: Approve
3111. By Łukasz Zemczak

Leftover from the revert!

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I forgot one leftover line from the old bindTexture code, I pushed the modification just now. Now it should be ready for the merge ;) I'm running it right now, and it 'just seems to work'!

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Looking at code it isn't immediately obvious that the changes should be:

89 - return;

as opposed to:

89 - return;
xx + break;

Not sure how to test.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

yes break is probably better.

3112. By Łukasz Zemczak

Probably break is better than nothing here - thanks for pointing this out Alan!

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/decor/src/decor.cpp'
2--- plugins/decor/src/decor.cpp 2012-04-19 07:28:34 +0000
3+++ plugins/decor/src/decor.cpp 2012-04-20 10:43:19 +0000
4@@ -320,66 +320,44 @@
5 pixmap (pixmap),
6 damage (None)
7 {
8- if (!bindTexture (pixmap))
9- return;
10-
11- damage = XDamageCreate (screen->dpy (), pixmap,
12- XDamageReportRawRectangles);
13-}
14-
15-/*
16- * DecorTexture::~DecorTexture
17- *
18- * Remove damage handle on texture
19- *
20- */
21-
22-DecorTexture::~DecorTexture ()
23-{
24- if (damage)
25- XDamageDestroy (screen->dpy (), damage);
26-}
27-
28-/*
29- * DecorTexture::indTexture
30- *
31- * This function actually takes and binds/rebinds the given Pixmap
32- * to a texture (i.e. calls GLTexture::bindPixmapToTexture)
33- *
34- */
35-
36-bool
37-DecorTexture::bindTexture (Pixmap src)
38-{
39 unsigned int width, height, depth, ui;
40 Window root;
41 int i;
42
43- pixmap = src;
44-
45 if (!XGetGeometry (screen->dpy (), pixmap, &root,
46 &i, &i, &width, &height, &ui, &depth))
47 {
48 status = false;
49- return false;
50+ return;
51 }
52
53- // Explicitly clear the texture list before binding/rebinding
54- textures.clear ();
55-
56 bindFailed = false;
57 textures = GLTexture::bindPixmapToTexture (pixmap, width, height, depth);
58 if (textures.size () != 1)
59 {
60 bindFailed = true;
61 status = false;
62- return false;
63+ return;
64 }
65
66 if (!DecorScreen::get (screen)->optionGetMipmap ())
67 textures[0]->setMipmap (false);
68
69- return true;
70+ damage = XDamageCreate (screen->dpy (), pixmap,
71+ XDamageReportRawRectangles);
72+}
73+
74+/*
75+ * DecorTexture::~DecorTexture
76+ *
77+ * Remove damage handle on texture
78+ *
79+ */
80+
81+DecorTexture::~DecorTexture ()
82+{
83+ if (damage)
84+ XDamageDestroy (screen->dpy (), damage);
85 }
86
87 /*
88@@ -2343,7 +2321,7 @@
89 dw->cWindow->damageOutputExtents ();
90 }
91 }
92- return;
93+ break;
94 }
95 }
96 }
97
98=== modified file 'plugins/decor/src/decor.h'
99--- plugins/decor/src/decor.h 2012-04-18 12:48:53 +0000
100+++ plugins/decor/src/decor.h 2012-04-20 10:43:19 +0000
101@@ -79,8 +79,6 @@
102 DecorTexture (Pixmap pixmap);
103 ~DecorTexture ();
104
105- bool bindTexture (Pixmap src);
106-
107 public:
108 bool status;
109 int refCount;

Subscribers

People subscribed via source and target branches