Merge lp:~smspillaz/unity/unity.6.0.fix_1036521 into lp:unity

Proposed by Sam Spilsbury on 2012-09-19
Status: Superseded
Proposed branch: lp:~smspillaz/unity/unity.6.0.fix_1036521
Merge into: lp:unity
Diff against target: 132 lines (+35/-4) (has conflicts)
5 files modified
launcher/CairoBaseWindow.cpp (+2/-1)
launcher/VolumeImp.cpp (+4/-1)
tests/gmockvolume.c (+22/-0)
tests/gmockvolume.h (+2/-0)
tests/test_volume_imp.cpp (+5/-2)
Text conflict in tests/gmockvolume.c
To merge this branch: bzr merge lp:~smspillaz/unity/unity.6.0.fix_1036521
Reviewer Review Type Date Requested Status
Unity Team 2012-09-19 Pending
Review via email: mp+125108@code.launchpad.net

This proposal has been superseded by a proposal from 2012-09-19.

Commit message

Don't call GraphicsContext::DeactivateFramebuffer which will immediately restore the backbuffer. Instead call WindowCompositor::RestoreMainFramebuffer to bind either the backbuffer or reference framebuffer for reading as that is the one we're drawing to as is the most-up-to-date

Description of the change

Don't call GraphicsContext::DeactivateFramebuffer which will immediately restore the backbuffer. Instead call WindowCompositor::RestoreMainFramebuffer to bind either the backbuffer or reference framebuffer for reading as that is the one we're drawing to as is the most-up-to-date

Test Suite: https://code.launchpad.net/~smspillaz/nux/nux.3.0.fix_1036521/+merge/125106

To post a comment you must log in.

Unmerged revisions

2692. By Sam Spilsbury on 2012-09-19

Don't call GraphicsContext::DeactivateFramebuffer which will immediately restore the backbuffer. Instead call WindowCompositor::RestoreMainFramebuffer to bind either the backbuffer or reference framebuffer for reading as that is the one we're drawing to as is the most-up-to-date

2691. By Andrea Azzarone on 2012-09-18

Use uuid+label as volume ID.. Fixes: . Approved by Marco Trevisan (Treviño).

2690. By Thomi Richards on 2012-09-18

Fix several autopilot tests.. Fixes: . Approved by Omer Akram.

2689. By Thomi Richards on 2012-09-17

Fix several autopilot tests.. Fixes: . Approved by Christopher Lee.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/CairoBaseWindow.cpp'
2--- launcher/CairoBaseWindow.cpp 2012-05-07 22:28:17 +0000
3+++ launcher/CairoBaseWindow.cpp 2012-09-19 06:38:27 +0000
4@@ -19,6 +19,7 @@
5
6
7 #include <Nux/Nux.h>
8+#include <Nux/WindowCompositor.h>
9
10 #include "unity-shared/CairoTexture.h"
11 #include "CairoBaseWindow.h"
12@@ -58,7 +59,7 @@
13 if (_use_blurred_background && _compute_blur_bkg)
14 {
15 auto current_fbo = nux::GetGraphicsDisplay()->GetGpuDevice()->GetCurrentFrameBufferObject();
16- nux::GetGraphicsDisplay()->GetGpuDevice()->DeactivateFrameBuffer();
17+ nux::GetWindowCompositor ().RestoreMainFramebuffer();
18
19 gfxContext.SetViewport(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());
20 gfxContext.SetScissor(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());
21
22=== modified file 'launcher/VolumeImp.cpp'
23--- launcher/VolumeImp.cpp 2012-08-28 17:39:44 +0000
24+++ launcher/VolumeImp.cpp 2012-09-19 06:38:27 +0000
25@@ -89,7 +89,10 @@
26
27 std::string GetIdentifier() const
28 {
29- return glib::String(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID)).Str();
30+ glib::String label(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_LABEL));
31+ glib::String uuid(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID));
32+
33+ return uuid.Str() + "-" + label.Str();
34 }
35
36 bool HasSiblings() const
37
38=== modified file 'tests/autopilot/unity/tests/test_quicklist.py'
39=== modified file 'tests/gmockvolume.c'
40--- tests/gmockvolume.c 2012-09-12 10:58:57 +0000
41+++ tests/gmockvolume.c 2012-09-19 06:38:27 +0000
42@@ -61,6 +61,12 @@
43 self->uuid = NULL;
44 }
45
46+ if (self->label)
47+ {
48+ g_free(self->label);
49+ self->label = NULL;
50+ }
51+
52 if (self->mount)
53 {
54 g_object_unref(self->mount);
55@@ -86,7 +92,12 @@
56 guint32 uuid = g_random_int();
57 mock_volume->name = g_strdup_printf("MockVolume %u", uuid);
58 mock_volume->icon = g_icon_new_for_string("", NULL);
59+<<<<<<< TREE
60 mock_volume->uuid = g_strdup_printf("%u", uuid);
61+=======
62+ mock_volume->uuid = g_strdup("");
63+ mock_volume->label = g_strdup("");
64+>>>>>>> MERGE-SOURCE
65 mock_volume->mount = NULL;
66 }
67
68@@ -153,6 +164,15 @@
69 return g_strdup (self->uuid);
70 }
71
72+void
73+g_mock_volume_set_label (GMockVolume *volume, const char* label)
74+{
75+ if (volume->label)
76+ g_free(volume->label);
77+
78+ volume->label = g_strdup (label);
79+}
80+
81 static GDrive *
82 g_mock_volume_get_drive (GVolume *volume)
83 {
84@@ -254,6 +274,8 @@
85
86 if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_UUID))
87 return g_strdup (self->uuid);
88+ else if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_LABEL))
89+ return g_strdup (self->label);
90
91 return NULL;
92 }
93
94=== modified file 'tests/gmockvolume.h'
95--- tests/gmockvolume.h 2012-08-17 15:53:06 +0000
96+++ tests/gmockvolume.h 2012-09-19 06:38:27 +0000
97@@ -43,6 +43,7 @@
98 char *name;
99 GIcon *icon;
100 char *uuid;
101+ char *label;
102 GMount *mount;
103 };
104
105@@ -56,6 +57,7 @@
106 void g_mock_volume_set_can_eject (GMockVolume* volume, gboolean can_eject);
107 void g_mock_volume_set_name (GMockVolume *volume, const char *name);
108 void g_mock_volume_set_icon (GMockVolume *volume, GIcon *icon);
109+void g_mock_volume_set_label (GMockVolume *volume, const char *label);
110 void g_mock_volume_set_uuid (GMockVolume *volume, const char *uuid);
111 void g_mock_volume_set_mount (GMockVolume *volume, GMount *mount);
112
113
114=== modified file 'tests/test_volume_imp.cpp'
115--- tests/test_volume_imp.cpp 2012-08-28 17:28:02 +0000
116+++ tests/test_volume_imp.cpp 2012-09-19 06:38:27 +0000
117@@ -98,10 +98,13 @@
118
119 TEST_F(TestVolumeImp, TestGetIdentifier)
120 {
121- std::string const uuid("0123456789abc");
122+ std::string const uuid = "uuid";
123+ std::string const label = "label";
124
125 g_mock_volume_set_uuid(gvolume_, uuid.c_str());
126- EXPECT_EQ(volume_->GetIdentifier(), uuid);
127+ g_mock_volume_set_label(gvolume_, label.c_str());
128+
129+ EXPECT_EQ(volume_->GetIdentifier(), uuid + "-" + label);
130 }
131
132 TEST_F(TestVolumeImp, TestIsMounted)