Yes... B_FULL_UPDATE_ON_RESIZE on Layer resize not with every redraw. :-D
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10966 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -60,6 +60,12 @@ BRegion gRedrawReg;
|
|||||||
BList gCopyRegList;
|
BList gCopyRegList;
|
||||||
BList gCopyList;
|
BList gCopyList;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
B_LAYER_ACTION_NONE = 0,
|
||||||
|
B_LAYER_ACTION_MOVE,
|
||||||
|
B_LAYER_ACTION_RESIZE
|
||||||
|
};
|
||||||
|
|
||||||
Layer::Layer(BRect frame, const char *name, int32 token, uint32 resize,
|
Layer::Layer(BRect frame, const char *name, int32 token, uint32 resize,
|
||||||
uint32 flags, DisplayDriver *driver)
|
uint32 flags, DisplayDriver *driver)
|
||||||
{
|
{
|
||||||
@@ -93,6 +99,7 @@ Layer::Layer(BRect frame, const char *name, int32 token, uint32 resize,
|
|||||||
fFlags = flags;
|
fFlags = flags;
|
||||||
fAdFlags = 0;
|
fAdFlags = 0;
|
||||||
fClassID = AS_LAYER_CLASS;
|
fClassID = AS_LAYER_CLASS;
|
||||||
|
fFrameAction = B_LAYER_ACTION_NONE;
|
||||||
fResizeMode = resize;
|
fResizeMode = resize;
|
||||||
fHidden = false;
|
fHidden = false;
|
||||||
|
|
||||||
@@ -553,7 +560,8 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|||||||
// calculate the minimum region/rectangle to be updated with
|
// calculate the minimum region/rectangle to be updated with
|
||||||
// a single message to the client.
|
// a single message to the client.
|
||||||
fUpdateReg = fFullVisible;
|
fUpdateReg = fFullVisible;
|
||||||
if (fFlags & B_FULL_UPDATE_ON_RESIZE)
|
if (fFlags & B_FULL_UPDATE_ON_RESIZE
|
||||||
|
&& fFrameAction == B_LAYER_ACTION_RESIZE)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
@@ -573,7 +581,8 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|||||||
|
|
||||||
// calculate the update region, then...
|
// calculate the update region, then...
|
||||||
fUpdateReg = fVisible;
|
fUpdateReg = fVisible;
|
||||||
if (fFlags & B_FULL_UPDATE_ON_RESIZE)
|
if (fFlags & B_FULL_UPDATE_ON_RESIZE
|
||||||
|
&& fFrameAction == B_LAYER_ACTION_RESIZE)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
@@ -596,7 +605,8 @@ void Layer::RequestDraw(const BRegion ®, Layer *startFrom)
|
|||||||
// No IPC is needed so this is done in place.
|
// No IPC is needed so this is done in place.
|
||||||
|
|
||||||
fUpdateReg = fVisible;
|
fUpdateReg = fVisible;
|
||||||
if (fFlags & B_FULL_UPDATE_ON_RESIZE)
|
if (fFlags & B_FULL_UPDATE_ON_RESIZE
|
||||||
|
&& fFrameAction == B_LAYER_ACTION_RESIZE)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
@@ -1149,6 +1159,8 @@ void Layer::MoveBy(float x, float y)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fFrameAction = B_LAYER_ACTION_MOVE;
|
||||||
|
|
||||||
BPoint pt(x,y);
|
BPoint pt(x,y);
|
||||||
BRect rect(fFull.Frame().OffsetByCopy(pt));
|
BRect rect(fFull.Frame().OffsetByCopy(pt));
|
||||||
|
|
||||||
@@ -1158,6 +1170,8 @@ void Layer::MoveBy(float x, float y)
|
|||||||
|
|
||||||
EmptyGlobals();
|
EmptyGlobals();
|
||||||
|
|
||||||
|
fFrameAction = B_LAYER_ACTION_NONE;
|
||||||
|
|
||||||
STRACE(("Layer(%s)::MoveBy() END\n", GetName()));
|
STRACE(("Layer(%s)::MoveBy() END\n", GetName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1251,6 +1265,8 @@ void Layer::ResizeBy(float x, float y)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fFrameAction = B_LAYER_ACTION_RESIZE;
|
||||||
|
|
||||||
BPoint pt(x,y);
|
BPoint pt(x,y);
|
||||||
BRect rect(fFull.Frame());
|
BRect rect(fFull.Frame());
|
||||||
rect.right += x;
|
rect.right += x;
|
||||||
@@ -1263,6 +1279,8 @@ void Layer::ResizeBy(float x, float y)
|
|||||||
|
|
||||||
EmptyGlobals();
|
EmptyGlobals();
|
||||||
|
|
||||||
|
fFrameAction = B_LAYER_ACTION_NONE;
|
||||||
|
|
||||||
STRACE(("Layer(%s)::ResizeBy() END\n", GetName()));
|
STRACE(("Layer(%s)::ResizeBy() END\n", GetName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user