the Link* api supports sending large messages through areas, thanks to Julun, and this TODO can be removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27220 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+16
-31
@@ -2732,8 +2732,7 @@ BView::StrokePolygon(const BPoint *ptArray, int32 numPoints, BRect bounds,
|
|||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
} else {
|
} else {
|
||||||
// TODO: send via an area
|
fprintf(stderr, "ERROR: Can't send polygon to app_server!\n");
|
||||||
fprintf(stderr, "ERROR: polygon to big for BPortLink!\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2759,8 +2758,7 @@ BView::FillPolygon(const BPolygon *polygon, ::pattern pattern)
|
|||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
} else {
|
} else {
|
||||||
// TODO: send via an area
|
fprintf(stderr, "ERROR: Can't send polygon to app_server!\n");
|
||||||
fprintf(stderr, "ERROR: polygon to big for BPortLink!\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2878,8 +2876,6 @@ BView::FillRegion(BRegion *region, ::pattern pattern)
|
|||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_FILL_REGION);
|
fOwner->fLink->StartMessage(AS_FILL_REGION);
|
||||||
fOwner->fLink->AttachRegion(*region);
|
fOwner->fLink->AttachRegion(*region);
|
||||||
// TODO: make this automatically chose
|
|
||||||
// to send over area or handle failure here?
|
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
}
|
}
|
||||||
@@ -3044,19 +3040,14 @@ BView::StrokeShape(BShape *shape, ::pattern pattern)
|
|||||||
_CheckLockAndSwitchCurrent();
|
_CheckLockAndSwitchCurrent();
|
||||||
_UpdatePattern(pattern);
|
_UpdatePattern(pattern);
|
||||||
|
|
||||||
if ((sd->opCount * sizeof(uint32)) + (sd->ptCount * sizeof(BPoint))
|
fOwner->fLink->StartMessage(AS_STROKE_SHAPE);
|
||||||
< MAX_ATTACHMENT_SIZE) {
|
fOwner->fLink->Attach<BRect>(shape->Bounds());
|
||||||
fOwner->fLink->StartMessage(AS_STROKE_SHAPE);
|
fOwner->fLink->Attach<int32>(sd->opCount);
|
||||||
fOwner->fLink->Attach<BRect>(shape->Bounds());
|
fOwner->fLink->Attach<int32>(sd->ptCount);
|
||||||
fOwner->fLink->Attach<int32>(sd->opCount);
|
fOwner->fLink->Attach(sd->opList, sd->opCount * sizeof(uint32));
|
||||||
fOwner->fLink->Attach<int32>(sd->ptCount);
|
fOwner->fLink->Attach(sd->ptList, sd->ptCount * sizeof(BPoint));
|
||||||
fOwner->fLink->Attach(sd->opList, sd->opCount * sizeof(uint32));
|
|
||||||
fOwner->fLink->Attach(sd->ptList, sd->ptCount * sizeof(BPoint));
|
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
} else {
|
|
||||||
// TODO: send via an area
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3073,20 +3064,14 @@ BView::FillShape(BShape *shape, ::pattern pattern)
|
|||||||
_CheckLockAndSwitchCurrent();
|
_CheckLockAndSwitchCurrent();
|
||||||
_UpdatePattern(pattern);
|
_UpdatePattern(pattern);
|
||||||
|
|
||||||
if ((sd->opCount * sizeof(uint32)) + (sd->ptCount * sizeof(BPoint))
|
fOwner->fLink->StartMessage(AS_FILL_SHAPE);
|
||||||
< MAX_ATTACHMENT_SIZE) {
|
fOwner->fLink->Attach<BRect>(shape->Bounds());
|
||||||
fOwner->fLink->StartMessage(AS_FILL_SHAPE);
|
fOwner->fLink->Attach<int32>(sd->opCount);
|
||||||
fOwner->fLink->Attach<BRect>(shape->Bounds());
|
fOwner->fLink->Attach<int32>(sd->ptCount);
|
||||||
fOwner->fLink->Attach<int32>(sd->opCount);
|
fOwner->fLink->Attach(sd->opList, sd->opCount * sizeof(int32));
|
||||||
fOwner->fLink->Attach<int32>(sd->ptCount);
|
fOwner->fLink->Attach(sd->ptList, sd->ptCount * sizeof(BPoint));
|
||||||
fOwner->fLink->Attach(sd->opList, sd->opCount * sizeof(int32));
|
|
||||||
fOwner->fLink->Attach(sd->ptList, sd->ptCount * sizeof(BPoint));
|
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
} else {
|
|
||||||
// TODO: send via an area
|
|
||||||
// BTW, in a perfect world, the fLink API would take care of that -- axeld.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user