Implement all missing Scene virtuals.
svn path=/branches/work/kwin_composite/; revision=591145
This commit is contained in:
parent
b59701f608
commit
f14000b7fb
3 changed files with 36 additions and 3 deletions
9
scene.h
9
scene.h
|
@ -23,12 +23,21 @@ class Scene
|
|||
public:
|
||||
Scene( Workspace* ws );
|
||||
virtual ~Scene();
|
||||
// repaints the given screen areas, windows provides the stacking order
|
||||
virtual void paint( QRegion damage, ToplevelList windows ) = 0;
|
||||
// shape/size of a window changed
|
||||
virtual void windowGeometryShapeChanged( Toplevel* );
|
||||
// opacity of a window changed
|
||||
virtual void windowOpacityChanged( Toplevel* );
|
||||
// a new window has been created
|
||||
virtual void windowAdded( Toplevel* );
|
||||
// a window has been destroyed
|
||||
virtual void windowDeleted( Toplevel* );
|
||||
// transforms the window areas to screen areas
|
||||
virtual void transformWindowDamage( Toplevel*, QRegion& ) const;
|
||||
// updates cached window information after an effect changes
|
||||
// transformation
|
||||
// TODO - remove?
|
||||
virtual void updateTransformation( Toplevel* );
|
||||
protected:
|
||||
Workspace* wspace;
|
||||
|
|
|
@ -184,6 +184,26 @@ void SceneOpenGL::windowGeometryShapeChanged( Toplevel* c )
|
|||
w.discardTexture();
|
||||
}
|
||||
|
||||
void SceneOpenGL::windowOpacityChanged( Toplevel* )
|
||||
{
|
||||
#if 0 // not really needed, windows are painted on every repaint
|
||||
// and opacity is used when applying texture, not when
|
||||
// creating it
|
||||
if( !windows.contains( c )) // this is ok, texture is created
|
||||
return; // on demand
|
||||
Window& w = windows[ c ];
|
||||
w.discardPixmap();
|
||||
w.discardTexture();
|
||||
#endif
|
||||
}
|
||||
|
||||
void SceneOpenGL::updateTransformation( Toplevel* c )
|
||||
{
|
||||
// TODO this is only used in effects to later update
|
||||
// screen damage - since opengl doesn't use screen
|
||||
// damage, just leave this empty
|
||||
}
|
||||
|
||||
SceneOpenGL::Window::Window( Toplevel* c )
|
||||
: toplevel( c )
|
||||
, glxpixmap( None )
|
||||
|
|
|
@ -27,9 +27,13 @@ class SceneOpenGL
|
|||
SceneOpenGL( Workspace* ws );
|
||||
virtual ~SceneOpenGL();
|
||||
virtual void paint( QRegion damage, ToplevelList windows );
|
||||
virtual void windowAdded( Toplevel* c );
|
||||
virtual void windowDeleted( Toplevel* c );
|
||||
virtual void windowGeometryShapeChanged( Toplevel* c );
|
||||
virtual void windowGeometryShapeChanged( Toplevel* );
|
||||
virtual void windowOpacityChanged( Toplevel* );
|
||||
virtual void windowAdded( Toplevel* );
|
||||
virtual void windowDeleted( Toplevel* );
|
||||
// screen damage is not used with opengl, it's completely repainted
|
||||
// virtual void transformWindowDamage( Toplevel*, QRegion& ) const;
|
||||
virtual void updateTransformation( Toplevel* );
|
||||
private:
|
||||
typedef GLuint Texture;
|
||||
GC gcroot;
|
||||
|
|
Loading…
Reference in a new issue