1 From 8afc7e2eb3ebec48d3879bf269143259c8bc18c8 Mon Sep 17 00:00:00 2001 |
|
2 From: Eric Anholt <[email protected]> |
|
3 Date: Mon, 26 Mar 2007 15:55:38 -0700 |
|
4 Subject: [PATCH] Refuse to initialize Composite if Render is not present. |
|
5 |
|
6 Composite relies on the presence of Render, in particular for the automatic |
|
7 compositing. |
|
8 --- |
|
9 composite/compext.c | 6 ++++++ |
|
10 1 files changed, 6 insertions(+), 0 deletions(-) |
|
11 |
|
12 diff --git a/composite/compext.c b/composite/compext.c |
|
13 index 4c25cc7..3a9f896 100644 |
|
14 --- a/composite/compext.c |
|
15 +++ b/composite/compext.c |
|
16 @@ -678,6 +678,12 @@ CompositeExtensionInit (void) |
|
17 ExtensionEntry *extEntry; |
|
18 int s; |
|
19 |
|
20 + /* Ensure that Render is initialized on all screens. */ |
|
21 + for (s = 0; s < screenInfo.numScreens; s++) { |
|
22 + if (GetPictureScreenIfSet(screenInfo.screens[s]) == NULL) |
|
23 + return; |
|
24 + } |
|
25 + |
|
26 CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow); |
|
27 if (!CompositeClientWindowType) |
|
28 return; |
|
29 -- |
|
30 1.4.1 |
|
31 |
|
32 From 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d Mon Sep 17 00:00:00 2001 |
|
33 From: Eric Anholt <[email protected]> |
|
34 Date: Mon, 26 Mar 2007 20:18:18 -0700 |
|
35 Subject: [PATCH] Disable Composite when the screen's visual is pseudocolor. |
|
36 |
|
37 Rendering fails badly in this case, and I don't care enough to fix it. |
|
38 --- |
|
39 composite/compext.c | 17 +++++++++++++++-- |
|
40 1 files changed, 15 insertions(+), 2 deletions(-) |
|
41 |
|
42 diff --git a/composite/compext.c b/composite/compext.c |
|
43 index 3a9f896..af05b4a 100644 |
|
44 --- a/composite/compext.c |
|
45 +++ b/composite/compext.c |
|
46 @@ -678,9 +678,22 @@ CompositeExtensionInit (void) |
|
47 ExtensionEntry *extEntry; |
|
48 int s; |
|
49 |
|
50 - /* Ensure that Render is initialized on all screens. */ |
|
51 for (s = 0; s < screenInfo.numScreens; s++) { |
|
52 - if (GetPictureScreenIfSet(screenInfo.screens[s]) == NULL) |
|
53 + ScreenPtr pScreen = screenInfo.screens[s]; |
|
54 + VisualPtr vis; |
|
55 + |
|
56 + /* Composite on 8bpp pseudocolor root windows appears to fail, so |
|
57 + * just disable it on anything pseudocolor for safety. |
|
58 + */ |
|
59 + for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++) |
|
60 + ; |
|
61 + if ((vis->class | DynamicClass) == PseudoColor) |
|
62 + return; |
|
63 + |
|
64 + /* Ensure that Render is initialized, which is required for automatic |
|
65 + * compositing. |
|
66 + */ |
|
67 + if (GetPictureScreenIfSet(pScreen) == NULL) |
|
68 return; |
|
69 } |
|
70 |
|
71 -- |
|
72 1.4.1 |
|
73 |
|
74 From 0bfc3cc22db94ec6867596606fe93228e315c847 Mon Sep 17 00:00:00 2001 |
|
75 From: Eric Anholt <[email protected]> |
|
76 Date: Tue, 27 Mar 2007 13:12:21 -0700 |
|
77 Subject: [PATCH] Disable composite when Xinerama is active. |
|
78 |
|
79 It will likely take a decent bit of work to make that work right. |
|
80 --- |
|
81 composite/compext.c | 5 +++++ |
|
82 1 files changed, 5 insertions(+), 0 deletions(-) |
|
83 |
|
84 diff --git a/composite/compext.c b/composite/compext.c |
|
85 index af05b4a..ba37e7d 100644 |
|
86 --- a/composite/compext.c |
|
87 +++ b/composite/compext.c |
|
88 @@ -696,6 +696,11 @@ CompositeExtensionInit (void) |
|
89 if (GetPictureScreenIfSet(pScreen) == NULL) |
|
90 return; |
|
91 } |
|
92 + /* Xinerama's rewriting of window drawing before Composite gets to it |
|
93 + * breaks Composite. |
|
94 + */ |
|
95 + if (!noPanoramiXExtension) |
|
96 + return; |
|
97 |
|
98 CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow); |
|
99 if (!CompositeClientWindowType) |
|
100 -- |
|
101 1.4.1 |
|
102 |
|
103 From 1af2ef0b25fd8017a3271e624a5f1548f02b09f9 Mon Sep 17 00:00:00 2001 |
|
104 From: Eric Anholt <[email protected]> |
|
105 Date: Tue, 27 Mar 2007 13:13:45 -0700 |
|
106 Subject: [PATCH] Enable Composite by default now that it disables itself in the known bad cases. |
|
107 --- |
|
108 os/utils.c | 5 +---- |
|
109 1 files changed, 1 insertions(+), 4 deletions(-) |
|
110 |
|
111 diff --git a/os/utils.c b/os/utils.c |
|
112 index 2fc5cbb..e605a6c 100644 |
|
113 --- a/os/utils.c |
|
114 +++ b/os/utils.c |
|
115 @@ -136,10 +136,7 @@ #ifdef BIGREQS |
|
116 _X_EXPORT Bool noBigReqExtension = FALSE; |
|
117 #endif |
|
118 #ifdef COMPOSITE |
|
119 - /* COMPOSITE is disabled by default for now until the |
|
120 - * interface is stable */ |
|
121 - #define COMPOSITE_DEFAULT FALSE |
|
122 -_X_EXPORT Bool noCompositeExtension = !COMPOSITE_DEFAULT; |
|
123 +_X_EXPORT Bool noCompositeExtension = FALSE; |
|
124 #endif |
|
125 |
|
126 #ifdef DAMAGE |
|
127 -- |
|
128 1.4.1 |
|
129 |
|
130 From 50fa8722d35c12e5f0322cebe25faf99c39d4f50 Mon Sep 17 00:00:00 2001 |
|
131 From: Aaron Plattner <[email protected]> |
|
132 Date: Thu, 20 Sep 2007 14:00:33 -0700 |
|
133 Subject: [PATCH] Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled). |
|
134 --- |
|
135 composite/compext.c | 6 ++++++ |
|
136 1 files changed, 6 insertions(+), 0 deletions(-) |
|
137 |
|
138 diff --git a/composite/compext.c b/composite/compext.c |
|
139 index 944f8d8..ece51d0 100644 |
|
140 --- a/composite/compext.c |
|
141 +++ b/composite/compext.c |
|
142 @@ -674,6 +674,9 @@ CompositeExtensionInit (void) |
|
143 ExtensionEntry *extEntry; |
|
144 int s; |
|
145 |
|
146 + /* Assume initialization is going to fail */ |
|
147 + noCompositeExtension = TRUE; |
|
148 + |
|
149 for (s = 0; s < screenInfo.numScreens; s++) { |
|
150 ScreenPtr pScreen = screenInfo.screens[s]; |
|
151 VisualPtr vis; |
|
152 @@ -731,4 +734,7 @@ #endif |
|
153 return; |
|
154 miRegisterRedirectBorderClipProc (compSetRedirectBorderClip, |
|
155 compGetRedirectBorderClip); |
|
156 + |
|
157 + /* Initialization succeeded */ |
|
158 + noCompositeExtension = FALSE; |
|
159 } |
|
160 -- |
|
161 1.4.1 |
|
162 |
|