Merge lp:~mc-return/compiz/compiz.merge-fix-1075578-workspacenames-flickering-during-display into lp:compiz/0.9.9

Proposed by MC Return on 2012-11-06
Status: Superseded
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix-1075578-workspacenames-flickering-during-display
Merge into: lp:compiz/0.9.9
Diff against target: 62 lines (+9/-17)
1 file modified
plugins/workspacenames/src/workspacenames.cpp (+9/-17)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix-1075578-workspacenames-flickering-during-display
Reviewer Review Type Date Requested Status
Daniel van Vugt 2012-11-06 Needs Fixing on 2012-11-07
Review via email: mp+133124@code.launchpad.net

This proposal has been superseded by a proposal from 2013-02-27.

Commit Message

Workspacenames Plug-in:
Call cScreen->damageScreen () in void WSNamesScreen::donePaint () not only if timer is true.
This fixes the flickering during display.
Other minor code refactoring.

(LP: #1075578)

Description of the Change

Note:
Sophisticated damage rectangle calculation and thus the FIXME is still missing.

To post a comment you must log in.
Daniel van Vugt (vanvugt) wrote :

I think we should fix the FIXME. damageScreen is too expensive in some cases, and always when unityshell is loaded.

Please try using damageRegion instead. Similar to:
https://code.launchpad.net/~vanvugt/compiz/fix-1068518/+merge/131552

review: Needs Fixing
MC Return (mc-return) wrote :

> I think we should fix the FIXME. damageScreen is too expensive in some cases,
> and always when unityshell is loaded.
>

I agree. Using the show repaint plug-in even shows that visually. This should be improved indeed.

> Please try using damageRegion instead. Similar to:
> https://code.launchpad.net/~vanvugt/compiz/fix-1068518/+merge/131552

I will try to do it.

MC Return (mc-return) wrote :

Somebody (Sam ? ;)) needs to help me with the implementation of the damage rectangle handling as I have no idea how to correctly implement it.

Nevertheless I would suggest to merge this branch for now as it fixes the flickering during display of the workspacename reliably.
Sophisticated damage handling can be implemented at a later stage as well, fixing the bug, every user of workspace naming experiences currently, should have priority.

3467. By Sam Spilsbury on 2013-03-30

Damage the text area correctly.
Extract the method used to determine where the text area was into a
separate function and use that to determine where our damage area should be.
Also fix a few errors that happened on the last frame of animation.

3468. By MC Return on 2013-03-30

Merged latest lp:compiz

3469. By MC Return on 2013-03-30

Reduced TEXT_BORDER from 10.0f to 2 and changed
it's type from const float to const unsigned short

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/workspacenames/src/workspacenames.cpp'
2--- plugins/workspacenames/src/workspacenames.cpp 2012-12-04 15:06:12 +0000
3+++ plugins/workspacenames/src/workspacenames.cpp 2013-02-26 19:45:28 +0000
4@@ -27,18 +27,14 @@
5 CompString
6 WSNamesScreen::getCurrentWSName ()
7 {
8- int currentVp;
9- int listSize;
10 CompString ret;
11- CompOption::Value::Vector names;
12- CompOption::Value::Vector vpNumbers;
13-
14- vpNumbers = optionGetViewports ();
15- names = optionGetNames ();
16-
17- currentVp = screen->vp ().y () * screen->vpSize ().width () +
18+
19+ CompOption::Value::Vector vpNumbers = optionGetViewports ();
20+ CompOption::Value::Vector names = optionGetNames ();
21+
22+ int currentVp = screen->vp ().y () * screen->vpSize ().width () +
23 screen->vp ().x () + 1;
24- listSize = MIN (vpNumbers.size (), names.size ());
25+ int listSize = MIN (vpNumbers.size (), names.size ());
26
27 for (int i = 0; i < listSize; i++)
28 if (vpNumbers[i].i () == currentVp)
29@@ -51,11 +47,10 @@
30 WSNamesScreen::renderNameText ()
31 {
32 CompText::Attrib attrib;
33- CompString name;
34
35 textData.clear ();
36
37- name = getCurrentWSName ();
38+ CompString name = getCurrentWSName ();
39
40 if (name.empty ())
41 return;
42@@ -135,9 +130,7 @@
43 CompOutput *output,
44 unsigned int mask)
45 {
46- bool status;
47-
48- status = gScreen->glPaintOutput (attrib, transform, region, output, mask);
49+ bool status = gScreen->glPaintOutput (attrib, transform, region, output, mask);
50
51 if (textData.getWidth () && textData.getHeight ())
52 {
53@@ -170,8 +163,7 @@
54 WSNamesScreen::donePaint ()
55 {
56 /* FIXME: better only damage paint region */
57- if (timer)
58- cScreen->damageScreen ();
59+ cScreen->damageScreen ();
60
61 cScreen->donePaint ();
62 }

Subscribers

People subscribed via source and target branches