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

Proposed by Sam Spilsbury
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 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

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

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

2690. By Thomi Richards

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

2689. By Thomi Richards

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
=== modified file 'launcher/CairoBaseWindow.cpp'
--- launcher/CairoBaseWindow.cpp 2012-05-07 22:28:17 +0000
+++ launcher/CairoBaseWindow.cpp 2012-09-19 06:38:27 +0000
@@ -19,6 +19,7 @@
1919
2020
21#include <Nux/Nux.h>21#include <Nux/Nux.h>
22#include <Nux/WindowCompositor.h>
2223
23#include "unity-shared/CairoTexture.h"24#include "unity-shared/CairoTexture.h"
24#include "CairoBaseWindow.h"25#include "CairoBaseWindow.h"
@@ -58,7 +59,7 @@
58 if (_use_blurred_background && _compute_blur_bkg)59 if (_use_blurred_background && _compute_blur_bkg)
59 {60 {
60 auto current_fbo = nux::GetGraphicsDisplay()->GetGpuDevice()->GetCurrentFrameBufferObject();61 auto current_fbo = nux::GetGraphicsDisplay()->GetGpuDevice()->GetCurrentFrameBufferObject();
61 nux::GetGraphicsDisplay()->GetGpuDevice()->DeactivateFrameBuffer();62 nux::GetWindowCompositor ().RestoreMainFramebuffer();
6263
63 gfxContext.SetViewport(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());64 gfxContext.SetViewport(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());
64 gfxContext.SetScissor(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());65 gfxContext.SetScissor(0, 0, gfxContext.GetWindowWidth(), gfxContext.GetWindowHeight());
6566
=== modified file 'launcher/VolumeImp.cpp'
--- launcher/VolumeImp.cpp 2012-08-28 17:39:44 +0000
+++ launcher/VolumeImp.cpp 2012-09-19 06:38:27 +0000
@@ -89,7 +89,10 @@
8989
90 std::string GetIdentifier() const90 std::string GetIdentifier() const
91 {91 {
92 return glib::String(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID)).Str();92 glib::String label(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_LABEL));
93 glib::String uuid(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID));
94
95 return uuid.Str() + "-" + label.Str();
93 }96 }
9497
95 bool HasSiblings() const98 bool HasSiblings() const
9699
=== modified file 'tests/autopilot/unity/tests/test_quicklist.py'
=== modified file 'tests/gmockvolume.c'
--- tests/gmockvolume.c 2012-09-12 10:58:57 +0000
+++ tests/gmockvolume.c 2012-09-19 06:38:27 +0000
@@ -61,6 +61,12 @@
61 self->uuid = NULL;61 self->uuid = NULL;
62 }62 }
6363
64 if (self->label)
65 {
66 g_free(self->label);
67 self->label = NULL;
68 }
69
64 if (self->mount)70 if (self->mount)
65 {71 {
66 g_object_unref(self->mount);72 g_object_unref(self->mount);
@@ -86,7 +92,12 @@
86 guint32 uuid = g_random_int();92 guint32 uuid = g_random_int();
87 mock_volume->name = g_strdup_printf("MockVolume %u", uuid);93 mock_volume->name = g_strdup_printf("MockVolume %u", uuid);
88 mock_volume->icon = g_icon_new_for_string("", NULL);94 mock_volume->icon = g_icon_new_for_string("", NULL);
95<<<<<<< TREE
89 mock_volume->uuid = g_strdup_printf("%u", uuid);96 mock_volume->uuid = g_strdup_printf("%u", uuid);
97=======
98 mock_volume->uuid = g_strdup("");
99 mock_volume->label = g_strdup("");
100>>>>>>> MERGE-SOURCE
90 mock_volume->mount = NULL;101 mock_volume->mount = NULL;
91}102}
92103
@@ -153,6 +164,15 @@
153 return g_strdup (self->uuid);164 return g_strdup (self->uuid);
154}165}
155166
167void
168g_mock_volume_set_label (GMockVolume *volume, const char* label)
169{
170 if (volume->label)
171 g_free(volume->label);
172
173 volume->label = g_strdup (label);
174}
175
156static GDrive *176static GDrive *
157g_mock_volume_get_drive (GVolume *volume)177g_mock_volume_get_drive (GVolume *volume)
158{178{
@@ -254,6 +274,8 @@
254274
255 if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_UUID))275 if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_UUID))
256 return g_strdup (self->uuid);276 return g_strdup (self->uuid);
277 else if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_LABEL))
278 return g_strdup (self->label);
257279
258 return NULL;280 return NULL;
259}281}
260282
=== modified file 'tests/gmockvolume.h'
--- tests/gmockvolume.h 2012-08-17 15:53:06 +0000
+++ tests/gmockvolume.h 2012-09-19 06:38:27 +0000
@@ -43,6 +43,7 @@
43 char *name;43 char *name;
44 GIcon *icon;44 GIcon *icon;
45 char *uuid;45 char *uuid;
46 char *label;
46 GMount *mount;47 GMount *mount;
47};48};
4849
@@ -56,6 +57,7 @@
56void g_mock_volume_set_can_eject (GMockVolume* volume, gboolean can_eject);57void g_mock_volume_set_can_eject (GMockVolume* volume, gboolean can_eject);
57void g_mock_volume_set_name (GMockVolume *volume, const char *name);58void g_mock_volume_set_name (GMockVolume *volume, const char *name);
58void g_mock_volume_set_icon (GMockVolume *volume, GIcon *icon);59void g_mock_volume_set_icon (GMockVolume *volume, GIcon *icon);
60void g_mock_volume_set_label (GMockVolume *volume, const char *label);
59void g_mock_volume_set_uuid (GMockVolume *volume, const char *uuid);61void g_mock_volume_set_uuid (GMockVolume *volume, const char *uuid);
60void g_mock_volume_set_mount (GMockVolume *volume, GMount *mount);62void g_mock_volume_set_mount (GMockVolume *volume, GMount *mount);
6163
6264
=== modified file 'tests/test_volume_imp.cpp'
--- tests/test_volume_imp.cpp 2012-08-28 17:28:02 +0000
+++ tests/test_volume_imp.cpp 2012-09-19 06:38:27 +0000
@@ -98,10 +98,13 @@
9898
99TEST_F(TestVolumeImp, TestGetIdentifier)99TEST_F(TestVolumeImp, TestGetIdentifier)
100{100{
101 std::string const uuid("0123456789abc");101 std::string const uuid = "uuid";
102 std::string const label = "label";
102103
103 g_mock_volume_set_uuid(gvolume_, uuid.c_str());104 g_mock_volume_set_uuid(gvolume_, uuid.c_str());
104 EXPECT_EQ(volume_->GetIdentifier(), uuid);105 g_mock_volume_set_label(gvolume_, label.c_str());
106
107 EXPECT_EQ(volume_->GetIdentifier(), uuid + "-" + label);
105}108}
106109
107TEST_F(TestVolumeImp, TestIsMounted)110TEST_F(TestVolumeImp, TestIsMounted)