first step of geting rid of abstract DisplayDriver base class for less development overhead, DisplayDriverPainter is renamed to DrawingEngine

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14694 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-11-04 15:23:54 +00:00
parent ec12c6fe6f
commit 58468dfed0
26 changed files with 147 additions and 133 deletions
+3 -3
View File
@@ -19,7 +19,7 @@
#include "DrawState.h" #include "DrawState.h"
class DesktopSettings; class DesktopSettings;
class DisplayDriver; class DrawingEngine;
class ServerFont; class ServerFont;
class BRegion; class BRegion;
@@ -52,7 +52,7 @@ class Decorator {
virtual ~Decorator(); virtual ~Decorator();
void SetColors(const ColorSet &cset); void SetColors(const ColorSet &cset);
void SetDriver(DisplayDriver *driver); void SetDriver(DrawingEngine *driver);
void SetFlags(int32 wflags); void SetFlags(int32 wflags);
void SetFeel(int32 wfeel); void SetFeel(int32 wfeel);
void SetFont(ServerFont *font); void SetFont(ServerFont *font);
@@ -137,7 +137,7 @@ class Decorator {
virtual void _SetColors(); virtual void _SetColors();
ColorSet* _colors; ColorSet* _colors;
DisplayDriver* _driver; DrawingEngine* _driver;
DrawState fDrawState; DrawState fDrawState;
int32 _look; int32 _look;
@@ -7,19 +7,39 @@
* Gabe Yoder <gyoder@stny.rr.com> * Gabe Yoder <gyoder@stny.rr.com>
* Stephan Aßmus <superstippi@gmx.de> * Stephan Aßmus <superstippi@gmx.de>
*/ */
#ifndef _DISPLAY_DRIVER_PAINTER_H_ #ifndef _DISPLAY_DRIVER_H_
#define _DISPLAY_DRIVER_PAINTER_H_ #define _DISPLAY_DRIVER_H_
#include "DisplayDriver.h" #include <Accelerant.h>
#include <Font.h>
#include <Locker.h>
#include <Point.h>
class BPoint;
class BRect;
class BRegion;
class DrawState;
class HWInterface;
class Painter; class Painter;
class RGBColor;
class ServerBitmap;
class ServerCursor;
class ServerFont;
typedef struct
{
BPoint pt1;
BPoint pt2;
rgb_color color;
class DisplayDriverPainter : public DisplayDriver { } LineArrayData;
class DrawingEngine {
public: public:
DisplayDriverPainter(HWInterface* interface = NULL); DrawingEngine(HWInterface* interface = NULL);
virtual ~DisplayDriverPainter(); virtual ~DrawingEngine();
// when implementing, be sure to call the inherited version // when implementing, be sure to call the inherited version
virtual status_t Initialize(); virtual status_t Initialize();
+1 -1
View File
@@ -87,7 +87,7 @@ DecorInfo::Instantiate(Desktop* desktop, BRect rect, const char *title,
return NULL; return NULL;
} }
decorator->SetDriver(desktop->GetDisplayDriver()); decorator->SetDriver(desktop->GetDrawingEngine());
gGUIColorSet.Lock(); gGUIColorSet.Lock();
decorator->SetColors(gGUIColorSet); decorator->SetColors(gGUIColorSet);
-1
View File
@@ -14,7 +14,6 @@
#include <ObjectList.h> #include <ObjectList.h>
#include "Decorator.h" #include "Decorator.h"
#include "DisplayDriver.h"
class DecorInfo; class DecorInfo;
class Desktop; class Desktop;
+3 -3
View File
@@ -11,7 +11,7 @@
#include "ColorSet.h" #include "ColorSet.h"
#include "Decorator.h" #include "Decorator.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include <Region.h> #include <Region.h>
@@ -77,10 +77,10 @@ Decorator::SetColors(const ColorSet &cset)
/*! /*!
\brief Assigns a display driver to the decorator \brief Assigns a display driver to the decorator
\param driver A valid DisplayDriver object \param driver A valid DrawingEngine object
*/ */
void void
Decorator::SetDriver(DisplayDriver *driver) Decorator::SetDriver(DrawingEngine *driver)
{ {
_driver = driver; _driver = driver;
// lots of subclasses will depend on the driver for text support, so call // lots of subclasses will depend on the driver for text support, so call
+1 -1
View File
@@ -14,7 +14,7 @@
#include "ColorUtils.h" #include "ColorUtils.h"
#include "DesktopSettings.h" #include "DesktopSettings.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include "DrawState.h" #include "DrawState.h"
#include "FontManager.h" #include "FontManager.h"
#include "PatternHandler.h" #include "PatternHandler.h"
+1 -1
View File
@@ -104,7 +104,7 @@ Desktop::Init()
char name[32]; char name[32];
sprintf(name, "RootLayer %d", 1); sprintf(name, "RootLayer %d", 1);
fRootLayer = new RootLayer(name, 4, this, GetDisplayDriver()); fRootLayer = new RootLayer(name, 4, this, GetDrawingEngine());
fRootLayer->RunThread(); fRootLayer->RunThread();
// take care of setting the default cursor // take care of setting the default cursor
+3 -3
View File
@@ -27,7 +27,7 @@
class BMessage; class BMessage;
class DisplayDriver; class DrawingEngine;
class HWInterface; class HWInterface;
class Layer; class Layer;
class RootLayer; class RootLayer;
@@ -64,8 +64,8 @@ class Desktop : public MessageLooper, public ScreenOwner {
virtual bool ReleaseScreen(Screen* screen) { return false; } virtual bool ReleaseScreen(Screen* screen) { return false; }
const ::VirtualScreen& VirtualScreen() const { return fVirtualScreen; } const ::VirtualScreen& VirtualScreen() const { return fVirtualScreen; }
inline DisplayDriver* GetDisplayDriver() const inline DrawingEngine* GetDrawingEngine() const
{ return fVirtualScreen.DisplayDriver(); } { return fVirtualScreen.DrawingEngine(); }
inline HWInterface* GetHWInterface() const inline HWInterface* GetHWInterface() const
{ return fVirtualScreen.HWInterface(); } { return fVirtualScreen.HWInterface(); }
+7 -7
View File
@@ -37,7 +37,7 @@
#include <View.h> #include <View.h>
#include "DebugInfoManager.h" #include "DebugInfoManager.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include "DrawState.h" #include "DrawState.h"
#include "PortLink.h" #include "PortLink.h"
#include "RootLayer.h" #include "RootLayer.h"
@@ -63,7 +63,7 @@
Layer::Layer(BRect frame, const char* name, int32 token, Layer::Layer(BRect frame, const char* name, int32 token,
uint32 resize, uint32 flags, DisplayDriver* driver) uint32 resize, uint32 flags, DrawingEngine* driver)
: :
fFrame(frame), // in parent coordinates fFrame(frame), // in parent coordinates
// fBoundsLeftTop(0.0, 0.0), // fBoundsLeftTop(0.0, 0.0),
@@ -128,7 +128,7 @@ CRITICAL(helper);
// NOTE: This flag is forwarded to a DrawState setting, even // NOTE: This flag is forwarded to a DrawState setting, even
// though it is actually not part of a "state". However, // though it is actually not part of a "state". However,
// it is an important detail of a graphics context, and we // it is an important detail of a graphics context, and we
// have no other means to pass this setting on to the DisplayDriver // have no other means to pass this setting on to the DrawingEngine
// other than through the DrawState. If we ever add a flag // other than through the DrawState. If we ever add a flag
// B_ANTI_ALIASING to the view flags, it would have to be passed // B_ANTI_ALIASING to the view flags, it would have to be passed
// in the same way. Though when breaking binary compatibility, // in the same way. Though when breaking binary compatibility,
@@ -1912,7 +1912,7 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) {
// move the region back for the actual operation // move the region back for the actual operation
copyRegion.OffsetBy(-xOffset, -yOffset); copyRegion.OffsetBy(-xOffset, -yOffset);
GetDisplayDriver()->CopyRegion(&copyRegion, xOffset, yOffset); GetDrawingEngine()->CopyRegion(&copyRegion, xOffset, yOffset);
// trigger the redraw // trigger the redraw
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL); GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
@@ -1939,7 +1939,7 @@ Layer::do_CopyBits(BRect& src, BRect& dst, int32 xOffset, int32 yOffset) {
// move the region back for the actual operation // move the region back for the actual operation
copyRegion.OffsetBy(-xOffset, -yOffset); copyRegion.OffsetBy(-xOffset, -yOffset);
GetDisplayDriver()->CopyRegion(&copyRegion, xOffset, yOffset); GetDrawingEngine()->CopyRegion(&copyRegion, xOffset, yOffset);
// trigger the redraw // trigger the redraw
GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL); GetRootLayer()->RequestDraw(GetRootLayer()->fRedrawReg, NULL);
@@ -2455,7 +2455,7 @@ void Layer::do_MoveBy(float dx, float dy)
// offset back and instruct the HW to do the actual copying. // offset back and instruct the HW to do the actual copying.
oldFullVisible.OffsetBy(-dx, -dy); oldFullVisible.OffsetBy(-dx, -dy);
GetDisplayDriver()->CopyRegion(&oldFullVisible, dx, dy); GetDrawingEngine()->CopyRegion(&oldFullVisible, dx, dy);
// add redrawReg to our RootLayer's redraw region. // add redrawReg to our RootLayer's redraw region.
// GetRootLayer()->fRedrawReg.Include(&redrawReg); // GetRootLayer()->fRedrawReg.Include(&redrawReg);
@@ -2489,7 +2489,7 @@ Layer::do_ScrollBy(float dx, float dy)
// compute the common region. we'll use HW acc to copy this to the new location. // compute the common region. we'll use HW acc to copy this to the new location.
invalid.IntersectWith(&fFullVisible2); invalid.IntersectWith(&fFullVisible2);
GetDisplayDriver()->CopyRegion(&invalid, -dx, -dy); GetDrawingEngine()->CopyRegion(&invalid, -dx, -dy);
// common region goes back to its original location. then, by excluding // common region goes back to its original location. then, by excluding
// it from curent fullVisible we'll obtain the region that needs to be redrawn. // it from curent fullVisible we'll obtain the region that needs to be redrawn.
+4 -4
View File
@@ -48,7 +48,7 @@ enum {
class ServerApp; class ServerApp;
class RootLayer; class RootLayer;
class DisplayDriver; class DrawingEngine;
class DrawState; class DrawState;
class ServerBitmap; class ServerBitmap;
@@ -70,7 +70,7 @@ class Layer {
public: public:
Layer(BRect frame, const char* name, Layer(BRect frame, const char* name,
int32 token, uint32 resize, int32 token, uint32 resize,
uint32 flags, DisplayDriver* driver); uint32 flags, DrawingEngine* driver);
virtual ~Layer(); virtual ~Layer();
void AddChild(Layer* child, ServerWindow* serverWin); void AddChild(Layer* child, ServerWindow* serverWin);
@@ -179,7 +179,7 @@ class Layer {
BRegion ConvertFromTop(BRegion *reg); BRegion ConvertFromTop(BRegion *reg);
DisplayDriver* GetDisplayDriver() const DrawingEngine* GetDrawingEngine() const
{ return fDriver; } { return fDriver; }
ServerWindow* Window() const ServerWindow* Window() const
@@ -354,7 +354,7 @@ class Layer {
bool fIsTopLayer; bool fIsTopLayer;
uint16 fAdFlags; uint16 fAdFlags;
DisplayDriver* fDriver; DrawingEngine* fDriver;
DrawState* fDrawState; DrawState* fDrawState;
RootLayer* fRootLayer; RootLayer* fRootLayer;
+2 -2
View File
@@ -25,7 +25,7 @@ OffscreenWinBorder::OffscreenWinBorder(ServerBitmap* bitmap,
B_NO_BORDER_WINDOW_LOOK, B_NO_BORDER_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL, B_NORMAL_WINDOW_FEEL,
0, 0, window, 0, 0, window,
new DisplayDriverPainter()), new DrawingEngine()),
fBitmap(bitmap), fBitmap(bitmap),
fHWInterface(new BitmapHWInterface(fBitmap)) fHWInterface(new BitmapHWInterface(fBitmap))
{ {
@@ -42,7 +42,7 @@ OffscreenWinBorder::OffscreenWinBorder(ServerBitmap* bitmap,
OffscreenWinBorder::~OffscreenWinBorder() OffscreenWinBorder::~OffscreenWinBorder()
{ {
fHWInterface->WriteLock(); fHWInterface->WriteLock();
// Unlike normal Layers, we own the DisplayDriver instance // Unlike normal Layers, we own the DrawingEngine instance
fDriver->Shutdown(); fDriver->Shutdown();
delete fDriver; delete fDriver;
fHWInterface->Shutdown(); fHWInterface->Shutdown();
+5 -5
View File
@@ -23,7 +23,7 @@
#include <PortLink.h> #include <PortLink.h>
#include "Decorator.h" #include "Decorator.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include "Globals.h" #include "Globals.h"
#include "HWInterface.h" #include "HWInterface.h"
#include "Layer.h" #include "Layer.h"
@@ -57,7 +57,7 @@ static RGBColor kDefaultWorkspaceColor = RGBColor(51, 102, 152);
static int32 kMaxWorkspaceCount = 32; static int32 kMaxWorkspaceCount = 32;
RootLayer::RootLayer(const char *name, int32 workspaceCount, RootLayer::RootLayer(const char *name, int32 workspaceCount,
Desktop *desktop, DisplayDriver *driver) Desktop *desktop, DrawingEngine *driver)
: Layer(BRect(0, 0, 0, 0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver), : Layer(BRect(0, 0, 0, 0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver),
fDesktop(desktop), fDesktop(desktop),
@@ -1173,7 +1173,7 @@ RootLayer::KeyboardEventHandler(BMessage *msg)
| B_LEFT_SHIFT_KEY | B_LEFT_OPTION_KEY)) != 0) | B_LEFT_SHIFT_KEY | B_LEFT_OPTION_KEY)) != 0)
#endif #endif
{ {
// TODO: Set to Safe Mode in KeyboardEventHandler:B_KEY_DOWN. (DisplayDriver API change) // TODO: Set to Safe Mode in KeyboardEventHandler:B_KEY_DOWN. (DrawingEngine API change)
STRACE(("Safe Video Mode invoked - code unimplemented\n")); STRACE(("Safe Video Mode invoked - code unimplemented\n"));
break; break;
} }
@@ -1224,7 +1224,7 @@ RootLayer::KeyboardEventHandler(BMessage *msg)
if (scancode == 0x7f) if (scancode == 0x7f)
#endif #endif
{ {
if (GetDisplayDriver()) { if (GetDrawingEngine()) {
char filename[128]; char filename[128];
BEntry entry; BEntry entry;
@@ -1234,7 +1234,7 @@ RootLayer::KeyboardEventHandler(BMessage *msg)
entry.SetTo(filename); entry.SetTo(filename);
} while(entry.Exists()); } while(entry.Exists());
GetDisplayDriver()->DumpToFile(filename); GetDrawingEngine()->DumpToFile(filename);
break; break;
} }
+2 -2
View File
@@ -38,7 +38,7 @@
#include "Layer.h" #include "Layer.h"
#include "Workspace.h" #include "Workspace.h"
class DisplayDriver; class DrawingEngine;
class HWInterface; class HWInterface;
class RGBColor; class RGBColor;
class Screen; class Screen;
@@ -67,7 +67,7 @@ class UtilityBitmap;
class RootLayer : public Layer { class RootLayer : public Layer {
public: public:
RootLayer(const char *name, int32 workspaceCount, RootLayer(const char *name, int32 workspaceCount,
Desktop *desktop, DisplayDriver *driver); Desktop *desktop, DrawingEngine *driver);
virtual ~RootLayer(void); virtual ~RootLayer(void);
Desktop* GetDesktop() const { return fDesktop; } Desktop* GetDesktop() const { return fDesktop; }
+1 -1
View File
@@ -14,7 +14,7 @@
class BMessage; class BMessage;
class DisplayDriver; class DrawingEngine;
class HWInterface; class HWInterface;
class Screen; class Screen;
+1 -1
View File
@@ -23,7 +23,7 @@
class AreaPool; class AreaPool;
class BMessage; class BMessage;
class BList; class BList;
class DisplayDriver; class DrawingEngine;
class ServerPicture; class ServerPicture;
class ServerCursor; class ServerCursor;
class ServerBitmap; class ServerBitmap;
+2 -2
View File
@@ -25,7 +25,7 @@
Screen::Screen(HWInterface *interface, int32 id) Screen::Screen(HWInterface *interface, int32 id)
: fID(id), : fID(id),
fDriver(interface ? new DisplayDriverPainter(interface) : NULL), fDriver(interface ? new DrawingEngine(interface) : NULL),
fHWInterface(interface) fHWInterface(interface)
{ {
} }
@@ -71,7 +71,7 @@ Screen::SetMode(display_mode mode)
{ {
status_t ret = fHWInterface->SetMode(mode); status_t ret = fHWInterface->SetMode(mode);
// the DisplayDriverPainter needs to adjust itself // the DrawingEngine needs to adjust itself
if (ret >= B_OK) if (ret >= B_OK)
fDriver->Update(); fDriver->Update();
+3 -3
View File
@@ -15,7 +15,7 @@
#include <Accelerant.h> #include <Accelerant.h>
#include <Point.h> #include <Point.h>
class DisplayDriver; class DrawingEngine;
class HWInterface; class HWInterface;
class Screen { class Screen {
@@ -45,7 +45,7 @@ class Screen {
inline int32 ScreenNumber() const inline int32 ScreenNumber() const
{ return fID; } { return fID; }
inline DisplayDriver* GetDisplayDriver() const inline DrawingEngine* GetDrawingEngine() const
{ return fDriver; } { return fDriver; }
inline HWInterface* GetHWInterface() const inline HWInterface* GetHWInterface() const
{ return fHWInterface; } { return fHWInterface; }
@@ -63,7 +63,7 @@ class Screen {
bool ignoreFrequency = false) const; bool ignoreFrequency = false) const;
int32 fID; int32 fID;
DisplayDriver* fDriver; DrawingEngine* fDriver;
HWInterface* fHWInterface; HWInterface* fHWInterface;
}; };
+9 -9
View File
@@ -39,7 +39,7 @@
#include "BGet++.h" #include "BGet++.h"
#include "DebugInfoManager.h" #include "DebugInfoManager.h"
#include "Desktop.h" #include "Desktop.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include "HWInterface.h" #include "HWInterface.h"
#include "Layer.h" #include "Layer.h"
#include "MessagePrivate.h" #include "MessagePrivate.h"
@@ -482,10 +482,10 @@ ServerWindow::CreateLayerTree(BPrivate::LinkReceiver &link, Layer **_parent)
&& (fWinBorder->WindowFlags() & kWorkspacesWindowFlag) != 0) { && (fWinBorder->WindowFlags() & kWorkspacesWindowFlag) != 0) {
// this is a workspaces window! // this is a workspaces window!
newLayer = new (nothrow) WorkspacesLayer(frame, name, token, resizeMask, newLayer = new (nothrow) WorkspacesLayer(frame, name, token, resizeMask,
flags, fWinBorder->GetDisplayDriver()); flags, fWinBorder->GetDrawingEngine());
} else { } else {
newLayer = new (nothrow) Layer(frame, name, token, resizeMask, flags, newLayer = new (nothrow) Layer(frame, name, token, resizeMask, flags,
fWinBorder->GetDisplayDriver()); fWinBorder->GetDrawingEngine());
} }
if (newLayer == NULL) if (newLayer == NULL)
@@ -1696,7 +1696,7 @@ ServerWindow::_DispatchGraphicsMessage(int32 code, BPrivate::LinkReceiver &link)
if (fWinBorder->InUpdate()) if (fWinBorder->InUpdate())
rreg.IntersectWith(&fWinBorder->RegionToBeUpdated()); rreg.IntersectWith(&fWinBorder->RegionToBeUpdated());
DisplayDriver* driver = fWinBorder->GetDisplayDriver(); DrawingEngine* driver = fWinBorder->GetDrawingEngine();
if (!driver) { if (!driver) {
// ?!? // ?!?
DTRACE(("ServerWindow %s: no display driver!!\n", Title())); DTRACE(("ServerWindow %s: no display driver!!\n", Title()));
@@ -1726,7 +1726,7 @@ ServerWindow::_DispatchGraphicsMessage(int32 code, BPrivate::LinkReceiver &link)
fCurrentLayer->ConvertToTop(p2), fCurrentLayer->ConvertToTop(p2),
fCurrentLayer->CurrentState()); fCurrentLayer->CurrentState());
// We update the pen here because many DisplayDriver calls which do not update the // We update the pen here because many DrawingEngine calls which do not update the
// pen position actually call StrokeLine // pen position actually call StrokeLine
// TODO: Decide where to put this, for example, it cannot be done // TODO: Decide where to put this, for example, it cannot be done
@@ -1990,7 +1990,7 @@ ServerWindow::_DispatchGraphicsMessage(int32 code, BPrivate::LinkReceiver &link)
delete[] rects; delete[] rects;
// TODO: create support for clipping_rect usage for faster BRegion display. // TODO: create support for clipping_rect usage for faster BRegion display.
// Tweaks to DisplayDriver are necessary along with conversion routines in Layer // Tweaks to DrawingEngine are necessary along with conversion routines in Layer
break; break;
} }
case AS_STROKE_LINEARRAY: case AS_STROKE_LINEARRAY:
@@ -2185,7 +2185,7 @@ ServerWindow::_CopyBits(RootLayer* rootLayer, Layer* layer,
// move the region back for the actual operation // move the region back for the actual operation
copyRegion.OffsetBy(-xOffset, -yOffset); copyRegion.OffsetBy(-xOffset, -yOffset);
layer->GetDisplayDriver()->CopyRegion(&copyRegion, xOffset, yOffset); layer->GetDrawingEngine()->CopyRegion(&copyRegion, xOffset, yOffset);
// trigger the redraw // trigger the redraw
if (rootLayer) { if (rootLayer) {
@@ -2235,9 +2235,9 @@ ServerWindow::MakeWinBorder(BRect frame, const char* name,
uint32 look, uint32 feel, uint32 flags, uint32 look, uint32 feel, uint32 flags,
uint32 workspace) uint32 workspace)
{ {
// The non-offscreen ServerWindow uses the DisplayDriver instance from the desktop. // The non-offscreen ServerWindow uses the DrawingEngine instance from the desktop.
return new(nothrow) WinBorder(frame, name, look, feel, flags, return new(nothrow) WinBorder(frame, name, look, feel, flags,
workspace, this, fDesktop->GetDisplayDriver()); workspace, this, fDesktop->GetDrawingEngine());
} }
+3 -3
View File
@@ -19,7 +19,7 @@
VirtualScreen::VirtualScreen() VirtualScreen::VirtualScreen()
: :
fScreenList(4, true), fScreenList(4, true),
fDisplayDriver(NULL), fDrawingEngine(NULL),
fHWInterface(NULL) fHWInterface(NULL)
{ {
} }
@@ -46,7 +46,7 @@ VirtualScreen::_Reset()
fSettings.MakeEmpty(); fSettings.MakeEmpty();
fFrame.Set(0, 0, 0, 0); fFrame.Set(0, 0, 0, 0);
fDisplayDriver = NULL; fDrawingEngine = NULL;
fHWInterface = NULL; fHWInterface = NULL;
} }
@@ -103,7 +103,7 @@ VirtualScreen::AddScreen(Screen* screen)
} }
// TODO: this works only for single screen configurations // TODO: this works only for single screen configurations
fDisplayDriver = screen->GetDisplayDriver(); fDrawingEngine = screen->GetDrawingEngine();
fHWInterface = screen->GetHWInterface(); fHWInterface = screen->GetHWInterface();
fFrame = screen->Frame(); fFrame = screen->Frame();
+4 -4
View File
@@ -14,7 +14,7 @@
#include <Message.h> #include <Message.h>
class Desktop; class Desktop;
class DisplayDriver; class DrawingEngine;
class HWInterface; class HWInterface;
@@ -23,8 +23,8 @@ class VirtualScreen {
VirtualScreen(); VirtualScreen();
~VirtualScreen(); ~VirtualScreen();
::DisplayDriver* DisplayDriver() const ::DrawingEngine* DrawingEngine() const
{ return fDisplayDriver; } { return fDrawingEngine; }
// TODO: can we have a multiplexing HWInterface as well? // TODO: can we have a multiplexing HWInterface as well?
// If not, this would need to be hidden, and only made // If not, this would need to be hidden, and only made
// available for the Screen class // available for the Screen class
@@ -60,7 +60,7 @@ class VirtualScreen {
BMessage fSettings; BMessage fSettings;
BRect fFrame; BRect fFrame;
BObjectList<screen_item> fScreenList; BObjectList<screen_item> fScreenList;
::DisplayDriver* fDisplayDriver; ::DrawingEngine* fDrawingEngine;
::HWInterface* fHWInterface; ::HWInterface* fHWInterface;
}; };
+5 -3
View File
@@ -66,7 +66,7 @@ WinBorder::WinBorder(const BRect &frame,
const uint32 flags, const uint32 flags,
const uint32 workspaces, const uint32 workspaces,
ServerWindow *window, ServerWindow *window,
DisplayDriver *driver) DrawingEngine *driver)
: Layer(frame, name, B_NULL_TOKEN, B_FOLLOW_NONE, 0UL, driver), : Layer(frame, name, B_NULL_TOKEN, B_FOLLOW_NONE, 0UL, driver),
fDecorator(NULL), fDecorator(NULL),
fTopLayer(NULL), fTopLayer(NULL),
@@ -126,8 +126,10 @@ WinBorder::WinBorder(const BRect &frame,
uint16 width, height; uint16 width, height;
uint32 colorSpace; uint32 colorSpace;
float frequency; float frequency;
GetRootLayer()->GetDesktop()->ScreenAt(0)->GetMode(width, height, colorSpace, frequency); if (GetRootLayer()->GetDesktop()->ScreenAt(0)) {
_ResizeBy(width - frame.Width(), height - frame.Height()); GetRootLayer()->GetDesktop()->ScreenAt(0)->GetMode(width, height, colorSpace, frequency);
_ResizeBy(width - frame.Width(), height - frame.Height());
}
} else } else
_ResizeBy(0, 0); _ResizeBy(0, 0);
+2 -2
View File
@@ -30,7 +30,7 @@ enum {
class ServerWindow; class ServerWindow;
class Decorator; class Decorator;
class DisplayDriver; class DrawingEngine;
class Desktop; class Desktop;
class WinBorder : public Layer { class WinBorder : public Layer {
@@ -42,7 +42,7 @@ class WinBorder : public Layer {
const uint32 flags, const uint32 flags,
const uint32 workspaces, const uint32 workspaces,
ServerWindow *window, ServerWindow *window,
DisplayDriver *driver); DrawingEngine *driver);
virtual ~WinBorder(); virtual ~WinBorder();
virtual void Draw(const BRect &r); virtual void Draw(const BRect &r);
+2 -2
View File
@@ -10,7 +10,7 @@
#include "WorkspacesLayer.h" #include "WorkspacesLayer.h"
#include "Workspace.h" #include "Workspace.h"
#include "RootLayer.h" #include "RootLayer.h"
#include "DisplayDriver.h" #include "DisplayDriverPainter.h"
#include "AppServer.h" #include "AppServer.h"
#include "WinBorder.h" #include "WinBorder.h"
@@ -19,7 +19,7 @@
WorkspacesLayer::WorkspacesLayer(BRect frame, const char* name, WorkspacesLayer::WorkspacesLayer(BRect frame, const char* name,
int32 token, uint32 resizeMode, uint32 flags, DisplayDriver* driver) int32 token, uint32 resizeMode, uint32 flags, DrawingEngine* driver)
: Layer(frame, name, token, resizeMode, flags, driver) : Layer(frame, name, token, resizeMode, flags, driver)
{ {
} }
+1 -1
View File
@@ -17,7 +17,7 @@ class WinBorder;
class WorkspacesLayer : public Layer { class WorkspacesLayer : public Layer {
public: public:
WorkspacesLayer(BRect frame, const char* name, int32 token, WorkspacesLayer(BRect frame, const char* name, int32 token,
uint32 resize, uint32 flags, DisplayDriver* driver); uint32 resize, uint32 flags, DrawingEngine* driver);
virtual ~WorkspacesLayer(); virtual ~WorkspacesLayer();
virtual void Draw(const BRect& updateRect); virtual void Draw(const BRect& updateRect);
@@ -6,9 +6,6 @@
* Stephan Aßmus <superstippi@gmx.de> * Stephan Aßmus <superstippi@gmx.de>
*/ */
/** Implementation of DisplayDriver based on top of Painter */
#include <stdio.h> #include <stdio.h>
#include <algo.h> #include <algo.h>
#include <stack.h> #include <stack.h>
@@ -78,32 +75,28 @@ class FontLocker {
// constructor // constructor
DisplayDriverPainter::DisplayDriverPainter(HWInterface* interface) DrawingEngine::DrawingEngine(HWInterface* interface)
: DisplayDriver(), : fPainter(new Painter()),
fPainter(new Painter()),
fGraphicsCard(interface), fGraphicsCard(interface),
fAvailableHWAccleration(0) fAvailableHWAccleration(0)
{ {
} }
// destructor // destructor
DisplayDriverPainter::~DisplayDriverPainter() DrawingEngine::~DrawingEngine()
{ {
delete fPainter; delete fPainter;
} }
// Initialize // Initialize
status_t status_t
DisplayDriverPainter::Initialize() DrawingEngine::Initialize()
{ {
status_t err = B_ERROR; status_t err = B_ERROR;
if (WriteLock()) { if (WriteLock()) {
err = fGraphicsCard->Initialize(); err = fGraphicsCard->Initialize();
if (err < B_OK) if (err < B_OK)
fprintf(stderr, "HWInterface::Initialize() failed: %s\n", strerror(err)); fprintf(stderr, "HWInterface::Initialize() failed: %s\n", strerror(err));
if (err >= B_OK) {
err = DisplayDriver::Initialize();
}
WriteUnlock(); WriteUnlock();
} }
return err; return err;
@@ -111,14 +104,13 @@ DisplayDriverPainter::Initialize()
// Shutdown // Shutdown
void void
DisplayDriverPainter::Shutdown() DrawingEngine::Shutdown()
{ {
DisplayDriver::Shutdown();
} }
// Update // Update
void void
DisplayDriverPainter::Update() DrawingEngine::Update()
{ {
if (Lock()) { if (Lock()) {
fPainter->AttachToBuffer(fGraphicsCard->DrawingBuffer()); fPainter->AttachToBuffer(fGraphicsCard->DrawingBuffer());
@@ -130,13 +122,14 @@ DisplayDriverPainter::Update()
// SetHWInterface // SetHWInterface
void void
DisplayDriverPainter::SetHWInterface(HWInterface* interface) DrawingEngine::SetHWInterface(HWInterface* interface)
{ {
fGraphicsCard = interface; fGraphicsCard = interface;
} }
// ConstrainClippingRegion // ConstrainClippingRegion
void DisplayDriverPainter::ConstrainClippingRegion(BRegion *region) void
DrawingEngine::ConstrainClippingRegion(BRegion *region)
{ {
if (Lock()) { if (Lock()) {
if (!region) { if (!region) {
@@ -265,7 +258,7 @@ is_above(const BRect& a, const BRect& b)
// CopyRegion // CopyRegion
void void
DisplayDriverPainter::CopyRegion(/*const*/ BRegion* region, DrawingEngine::CopyRegion(/*const*/ BRegion* region,
int32 xOffset, int32 yOffset) int32 xOffset, int32 yOffset)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
@@ -395,7 +388,7 @@ DisplayDriverPainter::CopyRegion(/*const*/ BRegion* region,
// here. In any case, to copy overlapping regions in app_server doesn't // here. In any case, to copy overlapping regions in app_server doesn't
// make much sense to me. // make much sense to me.
void void
DisplayDriverPainter::CopyRegionList(BList* list, BList* pList, DrawingEngine::CopyRegionList(BList* list, BList* pList,
int32 rCount, BRegion* clipReg) int32 rCount, BRegion* clipReg)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
@@ -415,7 +408,7 @@ DisplayDriverPainter::CopyRegionList(BList* list, BList* pList,
// InvertRect // InvertRect
void void
DisplayDriverPainter::InvertRect(BRect r) DrawingEngine::InvertRect(BRect r)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
// This needs to be investigated, I'm doing this because of // This needs to be investigated, I'm doing this because of
@@ -446,7 +439,7 @@ DisplayDriverPainter::InvertRect(BRect r)
// DrawBitmap // DrawBitmap
void void
DisplayDriverPainter::DrawBitmap(ServerBitmap *bitmap, DrawingEngine::DrawBitmap(ServerBitmap *bitmap,
const BRect &source, const BRect &dest, const BRect &source, const BRect &dest,
const DrawState *d) const DrawState *d)
{ {
@@ -468,7 +461,7 @@ DisplayDriverPainter::DrawBitmap(ServerBitmap *bitmap,
// FillArc // FillArc
void void
DisplayDriverPainter::FillArc(BRect r, const float &angle, DrawingEngine::FillArc(BRect r, const float &angle,
const float &span, const DrawState *d) const float &span, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -496,7 +489,7 @@ DisplayDriverPainter::FillArc(BRect r, const float &angle,
// FillBezier // FillBezier
void void
DisplayDriverPainter::FillBezier(BPoint *pts, const DrawState *d) DrawingEngine::FillBezier(BPoint *pts, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
fGraphicsCard->HideSoftwareCursor(); fGraphicsCard->HideSoftwareCursor();
@@ -514,7 +507,7 @@ DisplayDriverPainter::FillBezier(BPoint *pts, const DrawState *d)
// FillEllipse // FillEllipse
void void
DisplayDriverPainter::FillEllipse(BRect r, const DrawState *d) DrawingEngine::FillEllipse(BRect r, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
make_rect_valid(r); make_rect_valid(r);
@@ -541,7 +534,7 @@ DisplayDriverPainter::FillEllipse(BRect r, const DrawState *d)
// FillPolygon // FillPolygon
void void
DisplayDriverPainter::FillPolygon(BPoint *ptlist, int32 numpts, DrawingEngine::FillPolygon(BPoint *ptlist, int32 numpts,
BRect bounds, const DrawState *d) BRect bounds, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -563,7 +556,7 @@ DisplayDriverPainter::FillPolygon(BPoint *ptlist, int32 numpts,
// FillRect // FillRect
void void
DisplayDriverPainter::FillRect(BRect r, const RGBColor& color) DrawingEngine::FillRect(BRect r, const RGBColor& color)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
// This needs to be investigated, I'm doing this because of // This needs to be investigated, I'm doing this because of
@@ -594,7 +587,7 @@ DisplayDriverPainter::FillRect(BRect r, const RGBColor& color)
// FillRect // FillRect
void void
DisplayDriverPainter::FillRect(BRect r, const DrawState *d) DrawingEngine::FillRect(BRect r, const DrawState *d)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
// This needs to be investigated, I'm doing this because of // This needs to be investigated, I'm doing this because of
@@ -640,7 +633,7 @@ DisplayDriverPainter::FillRect(BRect r, const DrawState *d)
// FillRegion // FillRegion
void void
DisplayDriverPainter::FillRegion(BRegion& r, const DrawState *d) DrawingEngine::FillRegion(BRegion& r, const DrawState *d)
{ {
// NOTE: Write locking because we might use HW acceleration. // NOTE: Write locking because we might use HW acceleration.
// This needs to be investigated, I'm doing this because of // This needs to be investigated, I'm doing this because of
@@ -687,7 +680,7 @@ DisplayDriverPainter::FillRegion(BRegion& r, const DrawState *d)
// FillRoundRect // FillRoundRect
void void
DisplayDriverPainter::FillRoundRect(BRect r, DrawingEngine::FillRoundRect(BRect r,
const float &xrad, const float &yrad, const float &xrad, const float &yrad,
const DrawState *d) const DrawState *d)
{ {
@@ -710,14 +703,14 @@ DisplayDriverPainter::FillRoundRect(BRect r,
// FillShape // FillShape
void void
DisplayDriverPainter::FillShape(const BRect &bounds, DrawingEngine::FillShape(const BRect &bounds,
const int32 &opcount, const int32 *oplist, const int32 &opcount, const int32 *oplist,
const int32 &ptcount, const BPoint *ptlist, const int32 &ptcount, const BPoint *ptlist,
const DrawState *d) const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
printf("DisplayDriverPainter::FillShape() - what is this stuff that gets passed here?\n"); printf("DrawingEngine::FillShape() - what is this stuff that gets passed here?\n");
Unlock(); Unlock();
} }
@@ -725,7 +718,7 @@ printf("DisplayDriverPainter::FillShape() - what is this stuff that gets passed
// FillTriangle // FillTriangle
void void
DisplayDriverPainter::FillTriangle(BPoint *pts, BRect bounds, DrawingEngine::FillTriangle(BPoint *pts, BRect bounds,
const DrawState *d) const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -746,7 +739,7 @@ DisplayDriverPainter::FillTriangle(BPoint *pts, BRect bounds,
// StrokeArc // StrokeArc
void void
DisplayDriverPainter::StrokeArc(BRect r, const float &angle, DrawingEngine::StrokeArc(BRect r, const float &angle,
const float &span, const DrawState *d) const float &span, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -774,7 +767,7 @@ DisplayDriverPainter::StrokeArc(BRect r, const float &angle,
// StrokeBezier // StrokeBezier
void void
DisplayDriverPainter::StrokeBezier(BPoint *pts, const DrawState *d) DrawingEngine::StrokeBezier(BPoint *pts, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
fGraphicsCard->HideSoftwareCursor(); fGraphicsCard->HideSoftwareCursor();
@@ -791,7 +784,7 @@ DisplayDriverPainter::StrokeBezier(BPoint *pts, const DrawState *d)
// StrokeEllipse // StrokeEllipse
void void
DisplayDriverPainter::StrokeEllipse(BRect r, const DrawState *d) DrawingEngine::StrokeEllipse(BRect r, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
make_rect_valid(r); make_rect_valid(r);
@@ -823,7 +816,7 @@ DisplayDriverPainter::StrokeEllipse(BRect r, const DrawState *d)
// * this function is only used by Decorators // * this function is only used by Decorators
// * it assumes a one pixel wide line // * it assumes a one pixel wide line
void void
DisplayDriverPainter::StrokeLine(const BPoint &start, const BPoint &end, const RGBColor &color) DrawingEngine::StrokeLine(const BPoint &start, const BPoint &end, const RGBColor &color)
{ {
if (Lock()) { if (Lock()) {
BRect touched(start, end); BRect touched(start, end);
@@ -846,7 +839,7 @@ DisplayDriverPainter::StrokeLine(const BPoint &start, const BPoint &end, const R
// StrokeLine // StrokeLine
void void
DisplayDriverPainter::StrokeLine(const BPoint &start, const BPoint &end, DrawState* context) DrawingEngine::StrokeLine(const BPoint &start, const BPoint &end, DrawState* context)
{ {
if (Lock()) { if (Lock()) {
BRect touched(start, end); BRect touched(start, end);
@@ -868,7 +861,7 @@ DisplayDriverPainter::StrokeLine(const BPoint &start, const BPoint &end, DrawSta
// StrokeLineArray // StrokeLineArray
void void
DisplayDriverPainter::StrokeLineArray(const int32 &numlines, DrawingEngine::StrokeLineArray(const int32 &numlines,
const LineArrayData *linedata, const LineArrayData *linedata,
const DrawState *d) const DrawState *d)
{ {
@@ -920,21 +913,21 @@ DisplayDriverPainter::StrokeLineArray(const int32 &numlines,
// //
// * this function is only used by Decorators // * this function is only used by Decorators
void void
DisplayDriverPainter::StrokePoint(const BPoint& pt, const RGBColor &color) DrawingEngine::StrokePoint(const BPoint& pt, const RGBColor &color)
{ {
StrokeLine(pt, pt, color); StrokeLine(pt, pt, color);
} }
// StrokePoint // StrokePoint
void void
DisplayDriverPainter::StrokePoint(const BPoint& pt, DrawState *context) DrawingEngine::StrokePoint(const BPoint& pt, DrawState *context)
{ {
StrokeLine(pt, pt, context); StrokeLine(pt, pt, context);
} }
// StrokePolygon // StrokePolygon
void void
DisplayDriverPainter::StrokePolygon(BPoint* ptlist, int32 numpts, DrawingEngine::StrokePolygon(BPoint* ptlist, int32 numpts,
BRect bounds, const DrawState* d, BRect bounds, const DrawState* d,
bool closed) bool closed)
{ {
@@ -959,7 +952,7 @@ DisplayDriverPainter::StrokePolygon(BPoint* ptlist, int32 numpts,
// //
// this function is used to draw a one pixel wide rect // this function is used to draw a one pixel wide rect
void void
DisplayDriverPainter::StrokeRect(BRect r, const RGBColor &color) DrawingEngine::StrokeRect(BRect r, const RGBColor &color)
{ {
if (Lock()) { if (Lock()) {
make_rect_valid(r); make_rect_valid(r);
@@ -987,7 +980,7 @@ DisplayDriverPainter::StrokeRect(BRect r, const RGBColor &color)
// StrokeRect // StrokeRect
void void
DisplayDriverPainter::StrokeRect(BRect r, const DrawState *d) DrawingEngine::StrokeRect(BRect r, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
// support invalid rects // support invalid rects
@@ -1012,7 +1005,7 @@ DisplayDriverPainter::StrokeRect(BRect r, const DrawState *d)
// StrokeRegion // StrokeRegion
void void
DisplayDriverPainter::StrokeRegion(BRegion& r, const DrawState *d) DrawingEngine::StrokeRegion(BRegion& r, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
BRect clipped(r.Frame()); BRect clipped(r.Frame());
@@ -1040,7 +1033,7 @@ DisplayDriverPainter::StrokeRegion(BRegion& r, const DrawState *d)
// StrokeRoundRect // StrokeRoundRect
void void
DisplayDriverPainter::StrokeRoundRect(BRect r, const float &xrad, DrawingEngine::StrokeRoundRect(BRect r, const float &xrad,
const float &yrad, const DrawState *d) const float &yrad, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -1064,13 +1057,13 @@ DisplayDriverPainter::StrokeRoundRect(BRect r, const float &xrad,
// StrokeShape // StrokeShape
void void
DisplayDriverPainter::StrokeShape(const BRect &bounds, const int32 &opcount, DrawingEngine::StrokeShape(const BRect &bounds, const int32 &opcount,
const int32 *oplist, const int32 &ptcount, const int32 *oplist, const int32 &ptcount,
const BPoint *ptlist, const DrawState *d) const BPoint *ptlist, const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
printf("DisplayDriverPainter::StrokeShape() - what is this stuff that gets passed here?\n"); printf("DrawingEngine::StrokeShape() - what is this stuff that gets passed here?\n");
Unlock(); Unlock();
} }
@@ -1078,7 +1071,7 @@ printf("DisplayDriverPainter::StrokeShape() - what is this stuff that gets passe
// StrokeTriangle // StrokeTriangle
void void
DisplayDriverPainter::StrokeTriangle(BPoint *pts, const BRect &bounds, DrawingEngine::StrokeTriangle(BPoint *pts, const BRect &bounds,
const DrawState *d) const DrawState *d)
{ {
if (Lock()) { if (Lock()) {
@@ -1101,7 +1094,7 @@ DisplayDriverPainter::StrokeTriangle(BPoint *pts, const BRect &bounds,
/* /*
// DrawString // DrawString
void void
DisplayDriverPainter::DrawString(const char *string, const int32 &length, DrawingEngine::DrawString(const char *string, const int32 &length,
const BPoint &pt, const RGBColor &color, const BPoint &pt, const RGBColor &color,
escapement_delta *delta) escapement_delta *delta)
{ {
@@ -1113,7 +1106,7 @@ DisplayDriverPainter::DrawString(const char *string, const int32 &length,
*/ */
// DrawString // DrawString
void void
DisplayDriverPainter::DrawString(const char* string, int32 length, DrawingEngine::DrawString(const char* string, int32 length,
const BPoint& pt, DrawState* d, const BPoint& pt, DrawState* d,
escapement_delta* delta) escapement_delta* delta)
{ {
@@ -1147,7 +1140,7 @@ DisplayDriverPainter::DrawString(const char* string, int32 length,
// StringWidth // StringWidth
float float
DisplayDriverPainter::StringWidth(const char* string, int32 length, DrawingEngine::StringWidth(const char* string, int32 length,
const DrawState* d, const DrawState* d,
escapement_delta* delta) escapement_delta* delta)
{ {
@@ -1164,7 +1157,7 @@ DisplayDriverPainter::StringWidth(const char* string, int32 length,
// StringWidth // StringWidth
float float
DisplayDriverPainter::StringWidth(const char* string, int32 length, DrawingEngine::StringWidth(const char* string, int32 length,
const ServerFont& font, const ServerFont& font,
escapement_delta* delta) escapement_delta* delta)
{ {
@@ -1177,7 +1170,7 @@ DisplayDriverPainter::StringWidth(const char* string, int32 length,
// StringHeight // StringHeight
float float
DisplayDriverPainter::StringHeight(const char *string, int32 length, DrawingEngine::StringHeight(const char *string, int32 length,
const DrawState *d) const DrawState *d)
{ {
float height = 0.0; float height = 0.0;
@@ -1193,35 +1186,35 @@ DisplayDriverPainter::StringHeight(const char *string, int32 length,
// Lock // Lock
bool bool
DisplayDriverPainter::Lock() DrawingEngine::Lock()
{ {
return fGraphicsCard->WriteLock(); return fGraphicsCard->WriteLock();
} }
// Unlock // Unlock
void void
DisplayDriverPainter::Unlock() DrawingEngine::Unlock()
{ {
fGraphicsCard->WriteUnlock(); fGraphicsCard->WriteUnlock();
} }
// WriteLock // WriteLock
bool bool
DisplayDriverPainter::WriteLock() DrawingEngine::WriteLock()
{ {
return fGraphicsCard->WriteLock(); return fGraphicsCard->WriteLock();
} }
// WriteUnlock // WriteUnlock
void void
DisplayDriverPainter::WriteUnlock() DrawingEngine::WriteUnlock()
{ {
fGraphicsCard->WriteUnlock(); fGraphicsCard->WriteUnlock();
} }
// DumpToFile // DumpToFile
bool bool
DisplayDriverPainter::DumpToFile(const char *path) DrawingEngine::DumpToFile(const char *path)
{ {
if (Lock()) { if (Lock()) {
RenderingBuffer* buffer = fGraphicsCard->DrawingBuffer(); RenderingBuffer* buffer = fGraphicsCard->DrawingBuffer();
@@ -1240,14 +1233,14 @@ DisplayDriverPainter::DumpToFile(const char *path)
// DumpToBitmap // DumpToBitmap
ServerBitmap* ServerBitmap*
DisplayDriverPainter::DumpToBitmap() DrawingEngine::DumpToBitmap()
{ {
return NULL; return NULL;
} }
// _CopyRect // _CopyRect
BRect BRect
DisplayDriverPainter::_CopyRect(BRect src, int32 xOffset, int32 yOffset) const DrawingEngine::_CopyRect(BRect src, int32 xOffset, int32 yOffset) const
{ {
BRect dst; BRect dst;
RenderingBuffer* buffer = fGraphicsCard->DrawingBuffer(); RenderingBuffer* buffer = fGraphicsCard->DrawingBuffer();
@@ -1288,7 +1281,7 @@ DisplayDriverPainter::_CopyRect(BRect src, int32 xOffset, int32 yOffset) const
// _CopyRect // _CopyRect
void void
DisplayDriverPainter::_CopyRect(uint8* src, uint32 width, uint32 height, DrawingEngine::_CopyRect(uint8* src, uint32 width, uint32 height,
uint32 bpr, int32 xOffset, int32 yOffset) const uint32 bpr, int32 xOffset, int32 yOffset) const
{ {
int32 xIncrement; int32 xIncrement;
+3 -3
View File
@@ -96,10 +96,10 @@ class HWInterface : public MultiLocker {
// BView::Draw() is called (if the cursor is within that views clipping region), // BView::Draw() is called (if the cursor is within that views clipping region),
// then, after all drawing commands that triggered have been caried out, // then, after all drawing commands that triggered have been caried out,
// it shows the cursor again. This approach would have the adventage of // it shows the cursor again. This approach would have the adventage of
// the code not cluttering/slowing down DisplayDriverPainter. // the code not cluttering/slowing down DrawingEngine.
// For now, we hide the cursor for any drawing operation that has // For now, we hide the cursor for any drawing operation that has
// a bounding box containing the cursor (in DisplayDriverPainter) so // a bounding box containing the cursor (in DrawingEngine) so
// the cursor hiding is completely transparent from code using DisplayDriverPainter. // the cursor hiding is completely transparent from code using DrawingEngine.
// --- // ---
// NOTE: Investigate locking for these! The client code should already hold a // NOTE: Investigate locking for these! The client code should already hold a
// ReadLock, but maybe these functions should acquire a WriteLock! // ReadLock, but maybe these functions should acquire a WriteLock!