e83820ed57
Also fixed Jamfile for the test environment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
73 lines
1.4 KiB
C++
73 lines
1.4 KiB
C++
/*
|
|
* Copyright 2005, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT license.
|
|
*
|
|
* Author:
|
|
* Stephan Aßmus <superstippi@gmx.de>
|
|
*/
|
|
|
|
|
|
#include "BitmapHWInterface.h"
|
|
#include "DrawingEngine.h"
|
|
#include "OffscreenWindowLayer.h"
|
|
#include "ServerBitmap.h"
|
|
|
|
#include <Debug.h>
|
|
#include "DebugInfoManager.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
OffscreenWindowLayer::OffscreenWindowLayer(ServerBitmap* bitmap,
|
|
const char* name, ::ServerWindow* window)
|
|
: WindowLayer(bitmap->Bounds(), name,
|
|
B_NO_BORDER_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
|
0, 0, window, new DrawingEngine()),
|
|
fBitmap(bitmap),
|
|
fHWInterface(new BitmapHWInterface(fBitmap))
|
|
{
|
|
GetDrawingEngine()->SetHWInterface(fHWInterface);
|
|
GetDrawingEngine()->Initialize();
|
|
GetDrawingEngine()->Update();
|
|
|
|
fVisibleRegion.Set(fFrame);
|
|
fVisibleContentRegion.Set(fFrame);
|
|
fVisibleContentRegionValid = true;
|
|
fContentRegion.Set(fFrame);
|
|
fContentRegionValid = true;
|
|
}
|
|
|
|
|
|
OffscreenWindowLayer::~OffscreenWindowLayer()
|
|
{
|
|
fHWInterface->WriteLock();
|
|
// Unlike normal Layers, we own the DrawingEngine instance
|
|
GetDrawingEngine()->Shutdown();
|
|
delete GetDrawingEngine();
|
|
fHWInterface->Shutdown();
|
|
fHWInterface->WriteUnlock();
|
|
delete fHWInterface;
|
|
}
|
|
|
|
|
|
void
|
|
OffscreenWindowLayer::Draw(const BRect &r)
|
|
{
|
|
// Nothing to do here
|
|
}
|
|
|
|
|
|
void
|
|
OffscreenWindowLayer::MoveBy(float x, float y)
|
|
{
|
|
// Nothing to do here
|
|
}
|
|
|
|
|
|
void
|
|
OffscreenWindowLayer::ResizeBy(float x, float y)
|
|
{
|
|
// Nothing to do here
|
|
}
|
|
|