haiku/src/servers/app/OffscreenWinBorder.h

39 lines
836 B
C
Raw Normal View History

offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:17:16 +04:00
/*
* Copyright 2005, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Author: Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef OFFSCREEN_WINBORDER_H
#define OFFSCREEN_WINBORDER_H
#include "WinBorder.h"
class BitmapHWInterface;
class ServerBitmap;
class OffscreenWinBorder : public WinBorder {
public:
OffscreenWinBorder(ServerBitmap* bitmap,
const char* name,
ServerWindow* window);
virtual ~OffscreenWinBorder();
virtual void Draw(const BRect &r);
virtual void MoveBy(float x, float y);
virtual void ResizeBy(float x, float y);
virtual bool IsOffscreenWindow() const
{ return true; }
virtual void SetTopLayer(Layer* layer);
private:
ServerBitmap* fBitmap;
BitmapHWInterface* fHWInterface;
};
#endif