From 0ba441fe8f379ec506000f7fa29f867cb6bc0d51 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 20 Jan 2003 01:53:36 +0000 Subject: [PATCH] remove the XImage from Surface --- DESIGN/render.dia | Bin 3246 -> 3191 bytes otk/surface.cc | 15 ++------------- otk/surface.hh | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/DESIGN/render.dia b/DESIGN/render.dia index 938e41220ebabef1a842a76df33e8b3cbfce738e..de912a5293830755e214e79e96ae35183c6decc6 100644 GIT binary patch delta 3021 zcmV;;3o`Vs8TS~FLj~&@C$hAWNHJdTDv#C^`Hi$tf1OQl%5w9=e13a-i;}w{Dzh9V z@fHCXWYLMrEYl+r1l=WgcH`OEF2KwK$tzMTXFwif27?T4`Vf5Xe*O)9p$SyJ?4{(D5-A*L7WhBe;=OC;>tdY z#6FAMK8v`x++=x~M{#+~<|@k)5v4V!GT(~+e2PVs$SKn$3hqDpbzGL&iR-_Pl0rv- z`t7gU^Hfb-H~cRT%hP0ck9SJ{=q_Ye{}zjK zC*JS>{4jYp`5O6heF8#r2#s+N1N>7St2qc2p@`l z{5;!+zq&dcJ(n^>f9Wa__Z%>rIf$^3_=wM_)0dk_#QJiP<>~Q4JCr~bi%Nfwh5EWC zc!)8B;crB|x+y!x_fgPu{Gt@O$kg;X9R40-G$M?rusDD)dxK}?pZeq1Z`L!uTLmtX zs3;odJ~p2F4svJ2Ma<^xcMxTYiOWLF5%VQS5Bbch3Yf{If1?B(VdC0U0z~?a-Zeje z73oss7g<{7Sz@dSrtau+A!zo>5dv)wRaz z9<*o*wU4#?FwzvMKcnj`7d2eCtQ^=wHjlkpr~2u~=fP_}&1c_xexh1t(%VWduchuC zvQY2ss4lW?e;!NIW~4frOx}IGO5*?YeLf4dCaIUFxcyxupG6rjqIbV!$-qKi4?z8>o1khp5%OuVkWlgevvR$&4e@T9 z+x$9Oe*pFa><8EnupeMQzyNILaGA8# z$EHrC+jUdpiT%%+#m5RV4lZawHRn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yG4?oY&8d|#i8zxw{m5Y2&T4n%X{?S1Rf9QHz;@TmEJIZ6a!bxugoH_oEh z>H=ZnR|`5}p=3#Lb?AuYvy_@dYb8^6#WYr3Z92!S-5;bbN7@(9Yb{%Nx*>V4j#`ut zv3=EXysEhswz@yfL&T}n5VH{bh`99uMi@4^e|I}s8z&s>RMRWRsDDqQJCUEiseh4w TS9!EPfAfF9_IRNL2KfL0nRE=h diff --git a/otk/surface.cc b/otk/surface.cc index 6cc453d4..af9da7a6 100644 --- a/otk/surface.cc +++ b/otk/surface.cc @@ -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) diff --git a/otk/surface.hh b/otk/surface.hh index 53738128..c21a65f3 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -18,7 +18,6 @@ class ScreenInfo; class Surface { int _screen; Point _size; - XImage *_im; Pixmap _pm; XftDraw *_xftdraw; -- 2.45.2