From 14ef62299d46d23e88314e5c0e9e661d03ed8c9c Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sun, 15 Feb 2004 20:26:01 +0000 Subject: [PATCH] Implemented and fixed font functions in DisplayDriver Added some copy functions to ServerBitmap Replaced LayerData component of Decorator with DrawData git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6601 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/servers/app/Decorator.h | 2 +- headers/private/servers/app/DisplayDriver.h | 9 +++++++++ headers/private/servers/app/ServerBitmap.h | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/headers/private/servers/app/Decorator.h b/headers/private/servers/app/Decorator.h index d84adc7736..ffe51f728c 100644 --- a/headers/private/servers/app/Decorator.h +++ b/headers/private/servers/app/Decorator.h @@ -122,7 +122,7 @@ protected: ColorSet *_colors; DisplayDriver *_driver; - LayerData _layerdata; + DrawData _drawdata; int32 _look, _feel, _flags; BRect _zoomrect,_closerect,_minimizerect,_tabrect,_frame, _resizerect,_borderrect; diff --git a/headers/private/servers/app/DisplayDriver.h b/headers/private/servers/app/DisplayDriver.h index 092dab71a8..ea386363f8 100644 --- a/headers/private/servers/app/DisplayDriver.h +++ b/headers/private/servers/app/DisplayDriver.h @@ -132,6 +132,11 @@ public: void SetSize(const int32 &w, const int32 &h) { _width=w; _height=h; } void SetBuffer(void *ptr) { _buffer=(uint8*)ptr; } void SetBitsPerPixel(color_space space,int32 bytesperline) { _HandleSpace(space,bytesperline); } + void ShallowCopy(const FBBitmap *from) + { + ServerBitmap::ShallowCopy((ServerBitmap*)from); + SetBuffer(from->Bits()); + } }; /*! @@ -269,6 +274,10 @@ protected: virtual bool AcquireBuffer(FBBitmap *bmp); virtual void ReleaseBuffer(void); + // This is for drivers which are internally double buffered and calling this will cause the real + // framebuffer to be updated + virtual void Invalidate(const BRect &r); + void FillArc(const BRect &r, const float &angle, const float &span, DisplayDriver*, SetHorizontalLineFuncType setLine); void FillBezier(BPoint *pts, DisplayDriver* driver, SetHorizontalLineFuncType setLine); void FillEllipse(const BRect &r, DisplayDriver* driver, SetHorizontalLineFuncType setLine); diff --git a/headers/private/servers/app/ServerBitmap.h b/headers/private/servers/app/ServerBitmap.h index 7668304a02..f5f218fdf7 100644 --- a/headers/private/servers/app/ServerBitmap.h +++ b/headers/private/servers/app/ServerBitmap.h @@ -88,6 +88,25 @@ public: //! Returns the identifier token for the bitmap int32 Token(void) const { return _token; } + //! Does a shallow copy of the bitmap passed to it + void ShallowCopy(const ServerBitmap *from) + { + if(!from) + return; + + _initialized=from->_initialized; + _area=from->_area; + _buffer=from->_buffer; + _width=from->_width; + _height=from->_height; + _bytesperrow=from->_bytesperrow; + _space=from->_space; + _flags=from->_flags; + _bpp=from->_bpp; + _token=from->_token; + _offset=from->_offset; + } + protected: friend class BitmapManager; friend class PicturePlayer;