]> Dogcows Code - chaz/openbox/commitdiff
remove the XImage from Surface
authorDana Jansens <danakj@orodu.net>
Mon, 20 Jan 2003 01:53:36 +0000 (01:53 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 20 Jan 2003 01:53:36 +0000 (01:53 +0000)
DESIGN/render.dia
otk/surface.cc
otk/surface.hh

index 938e41220ebabef1a842a76df33e8b3cbfce738e..de912a5293830755e214e79e96ae35183c6decc6 100644 (file)
Binary files a/DESIGN/render.dia and b/DESIGN/render.dia differ
index 6cc453d4d2dac5b219df780d82c925915a549683..af9da7a6eac492a6b7c2fce3b7bd58bd48c9a75e 100644 (file)
@@ -17,7 +17,6 @@ namespace otk {
 Surface::Surface(int screen)
   : _screen(screen),
     _size(1, 1),
-    _im(0),
     _pm(None),
     _xftdraw(0)
 {
@@ -27,7 +26,6 @@ Surface::Surface(int screen)
 Surface::Surface(int screen, const Point &size)
   : _screen(screen),
     _size(size),
-    _im(0),
     _pm(None),
     _xftdraw(0)
 {
@@ -41,13 +39,10 @@ Surface::~Surface()
 
 void Surface::createObjects()
 {
-  assert(!_im); assert(_pm == None); assert(!_xftdraw);
+  assert(_pm == None); assert(!_xftdraw);
 
   const ScreenInfo *info = display->screenInfo(_screen);
   
-  _im = XCreateImage(**display, info->visual(), info->depth(),
-                    ZPixmap, 0, NULL, _size.x(), _size.y(), 32, 0);
-
   _pm = XCreatePixmap(**display, info->rootWindow(), _size.x(), _size.y(),
                      info->depth());
 
@@ -56,19 +51,13 @@ void Surface::createObjects()
 
 void Surface::destroyObjects()
 {
-  assert(_im); assert(_pm != None); assert(_xftdraw);
+  assert(_pm != None); assert(_xftdraw);
 
   XftDrawDestroy(_xftdraw);
   _xftdraw = 0;
 
   XFreePixmap(**display, _pm);
   _pm = None;
-
-  // do the delete ourselves cuz we alloc it with new not malloc
-  delete [] _im->data;
-  _im->data = NULL;
-  XDestroyImage(_im);
-  _im = 0;
 }
 
 void Surface::setSize(int w, int h)
index 53738128a2d8b06328f43e48eea56d7cd50450a5..c21a65f30bf53795538391f5356a777edb081703 100644 (file)
@@ -18,7 +18,6 @@ class ScreenInfo;
 class Surface {
   int _screen;
   Point _size;
-  XImage *_im;
   Pixmap _pm;
   XftDraw *_xftdraw;
 
This page took 0.025846 seconds and 4 git commands to generate.