Merge lp:~om26er/ubuntu/oneiric/nux/sru-888039 into lp:ubuntu/oneiric-proposed/nux

Proposed by Omer Akram
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~om26er/ubuntu/oneiric/nux/sru-888039
Merge into: lp:ubuntu/oneiric-proposed/nux
Diff against target: 68 lines (+17/-12)
2 files modified
NuxGraphics/RunTimeStats.cpp (+10/-12)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~om26er/ubuntu/oneiric/nux/sru-888039
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+92297@code.launchpad.net

Description of the change

this backport should fix a very problematic issue i.e. the performance of the desktop keeps degrading with the use of few hours. This fix have been confirmed to fix that.

To post a comment you must log in.
55. By Omer Akram

fix my dumbness

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work, I uploaded that, it needs review and approval still though

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/RunTimeStats.cpp'
2--- NuxGraphics/RunTimeStats.cpp 2011-08-18 17:57:09 +0000
3+++ NuxGraphics/RunTimeStats.cpp 2012-02-09 15:59:19 +0000
4@@ -114,7 +114,9 @@
5 }
6 case RTTEXTURE:
7 {
8- _texture_2d_array.push_back (NUX_STATIC_CAST (IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID() );
9+ int id = NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID();
10+ if (id)
11+ _texture_2d_array.push_back(NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID());
12 m_NumTex2D++;
13 m_GPUSizeTex2D += GetTextureSize (NUX_REINTERPRET_CAST (IOpenGLBaseTexture *, GraphicsObject) );
14 m_TotalGPUSize += m_GPUSizeTex2D;
15@@ -122,7 +124,9 @@
16 }
17 case RTTEXTURERECTANGLE:
18 {
19- _texture_rect_array.push_back (NUX_STATIC_CAST (IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID() );
20+ int id = NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID();
21+ if (id)
22+ _texture_rect_array.push_back(NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID());
23 m_NumTexRectangle++;
24 m_GPUSizeTexRectangle += GetTextureSize (NUX_REINTERPRET_CAST (IOpenGLBaseTexture *, GraphicsObject) );
25 m_TotalGPUSize += m_GPUSizeTexRectangle;
26@@ -183,11 +187,8 @@
27 }
28 case RTTEXTURE:
29 {
30- std::vector<int>::iterator it;
31- it = std::find (_texture_2d_array.begin(), _texture_2d_array.end(), NUX_STATIC_CAST (IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID() );
32-
33- if (it != _texture_2d_array.end() )
34- _texture_2d_array.erase (it);
35+ int id = NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID();
36+ _texture_2d_array.erase(std::remove(_texture_2d_array.begin(), _texture_2d_array.end(), id), _texture_2d_array.end());
37
38 m_NumTex2D--;
39 m_GPUSizeTex2D -= GetTextureSize (NUX_REINTERPRET_CAST (IOpenGLBaseTexture *, GraphicsObject) );
40@@ -196,11 +197,8 @@
41 }
42 case RTTEXTURERECTANGLE:
43 {
44- std::vector<int>::iterator it;
45- it = std::find (_texture_rect_array.begin(), _texture_rect_array.end(), NUX_STATIC_CAST (IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID() );
46-
47- if (it != _texture_rect_array.end() )
48- _texture_rect_array.erase (it);
49+ int id = NUX_STATIC_CAST(IOpenGLBaseTexture *, GraphicsObject)->GetOpenGLID();
50+ _texture_rect_array.erase(std::remove(_texture_rect_array.begin(), _texture_rect_array.end(), id), _texture_rect_array.end());
51
52 m_NumTexRectangle--;
53 m_GPUSizeTexRectangle -= GetTextureSize (NUX_REINTERPRET_CAST (IOpenGLBaseTexture *, GraphicsObject) );
54
55=== modified file 'debian/changelog'
56--- debian/changelog 2012-01-15 12:50:34 +0000
57+++ debian/changelog 2012-02-09 15:59:19 +0000
58@@ -1,3 +1,10 @@
59+nux (1.16.0-0ubuntu1.2) oneiric-proposed; urgency=low
60+
61+ * NuxGraphics/RunTimeStats.cpp:
62+ - Gradual degradation in desktop performance. (LP: #888039)
63+
64+ -- Omer Akram <om26er@ubuntu.com> Thu, 09 Feb 2012 20:56:12 +0500
65+
66 nux (1.16.0-0ubuntu1.1) oneiric-proposed; urgency=low
67
68 * NuxGraphics/GraphicsDisplayX11.cpp:

Subscribers

People subscribed via source and target branches

to all changes: