~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/unityshell.h

  • Committer: Sam Spilsbury
  • Date: 2011-08-20 19:08:45 UTC
  • mto: (1402.1.2 unity.blur-but-faster)
  • mto: This revision was merged to the branch mainline in revision 1404.
  • Revision ID: sam.spilsbury@canonical.com-20110820190845-cs76yidxic98ektd
Detect occlusions and apply this to the region update logic

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
  typedef boost::shared_ptr <UnityFBO> Ptr;
51
51
 
52
 
  UnityFBO (CompOutput *o);
53
 
  ~UnityFBO ();
 
52
  UnityFBO(CompOutput* o);
 
53
  ~UnityFBO();
54
54
 
55
55
public:
56
56
 
57
 
  void bind ();
58
 
  void unbind ();
59
 
 
60
 
  bool status ();
61
 
  void paint ();
62
 
  
63
 
  GLuint texture () { return mFBTexture; }
 
57
  void bind();
 
58
  void unbind();
 
59
 
 
60
  bool status();
 
61
  void paint();
 
62
 
 
63
  GLuint texture()
 
64
  {
 
65
    return mFBTexture;
 
66
  }
64
67
 
65
68
private:
66
69
 
68
71
  GLuint   mFboHandle; // actual handle to the framebuffer_ext
69
72
  bool    mFboStatus; // did the framebuffer texture bind succeed
70
73
  GLuint   mFBTexture;
71
 
  CompOutput *output;
 
74
  CompOutput* output;
72
75
};
73
76
 
74
77
 
110
113
  void paintDisplay(const CompRegion& region, const GLMatrix& transform, unsigned int mask);
111
114
  void paintPanelShadow(const GLMatrix& matrix);
112
115
 
113
 
  void donePaint ();
114
 
  void preparePaint (int ms);
115
 
  void paintFboForOutput (CompOutput *output);
 
116
  void donePaint();
 
117
  void preparePaint(int ms);
 
118
  void paintFboForOutput(CompOutput* output);
116
119
 
117
120
  /* paint on top of all windows if we could not find a window
118
121
   * to paint underneath */
176
179
  void NeedsRelayout();
177
180
  void ScheduleRelayout(guint timeout);
178
181
 
179
 
  void setActiveFbo (GLuint fbo) { mActiveFbo = fbo; }
 
182
  void setActiveFbo(GLuint fbo)
 
183
  {
 
184
    mActiveFbo = fbo;
 
185
  }
180
186
 
181
187
protected:
182
188
  const gchar* GetName();
185
191
private:
186
192
  void SendExecuteCommand();
187
193
 
188
 
  void EnsureKeybindings ();
 
194
  void EnsureKeybindings();
189
195
 
190
196
  static gboolean initPluginActions(gpointer data);
191
197
  static void initLauncher(nux::NThread* thread, void* InitData);
244
250
  bool    _key_nav_mode_requested;
245
251
  CompOutput* _last_output;
246
252
  CompWindowList _withRemovedNuxWindows;
 
253
  CompRegion     intersecting_pre_nux_damage_;
247
254
 
248
255
  DesktopLauncherIcon* switcher_desktop_icon;
249
256
 
251
258
 
252
259
  unity::BGHash _bghash;
253
260
 
254
 
  std::map <CompOutput *, UnityFBO::Ptr> mFbos;
 
261
  std::map <CompOutput*, UnityFBO::Ptr> mFbos;
255
262
  GLuint                                 mActiveFbo;
256
263
 
257
 
  bool   queryForShader ();
 
264
  bool   queryForShader();
258
265
 
259
266
  UBusManager ubus_manager_;
260
267
  bool dash_is_open_;
261
268
  CompScreen::GrabHandle grab_index_;
262
269
 
263
 
   friend class UnityWindow;
 
270
  friend class UnityWindow;
264
271
};
265
272
 
266
273
class UnityWindow :
278
285
 
279
286
  nux::Geometry last_bound;
280
287
 
 
288
  /* occlusion detection only */
 
289
  bool glPaint(const GLWindowPaintAttrib& attrib,
 
290
               const GLMatrix&            matrix,
 
291
               const CompRegion&          region,
 
292
               unsigned int              mask);
 
293
 
281
294
  /* basic window draw function */
282
295
  bool glDraw(const GLMatrix& matrix,
283
296
              GLFragment::Attrib& attrib,
284
297
              const CompRegion& region,
285
298
              unsigned intmask);
286
299
 
287
 
  void updateIconPos (int   &wx,
288
 
                      int   &wy,
289
 
                      int   x,
290
 
                      int   y,
291
 
                      float width,
292
 
                      float height);
 
300
  void updateIconPos(int&   wx,
 
301
                     int&   wy,
 
302
                     int   x,
 
303
                     int   y,
 
304
                     float width,
 
305
                     float height);
293
306
 
294
307
  void windowNotify(CompWindowNotify n);
295
308
  void moveNotify(int x, int y, bool immediate);
299
312
  bool place(CompPoint& pos);
300
313
  CompPoint tryNotIntersectLauncher(CompPoint& pos);
301
314
 
302
 
  void paintThumbnail (nux::Geometry const& bounding, float alpha);
 
315
  void paintThumbnail(nux::Geometry const& bounding, float alpha);
303
316
};
304
317
 
305
318