Patch by Artur Wyszynski with some changes by myself:

* Resolved TODO: The type of the gradient is no longer encoded twice in the
  app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
  method.
* Check success for (at least) ReadGradient() in ServerWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28150 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-10-15 19:47:00 +00:00
parent 2259002bdb
commit 431dc47dde
7 changed files with 134 additions and 232 deletions
-9
View File
@@ -2629,7 +2629,6 @@ BView::FillEllipse(BRect rect, const BGradient& gradient)
fOwner->fLink->StartMessage(AS_FILL_ELLIPSE_GRADIENT);
fOwner->fLink->Attach<BRect>(rect);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -2714,7 +2713,6 @@ BView::FillArc(BRect rect, float startAngle, float arcAngle,
fOwner->fLink->Attach<BRect>(rect);
fOwner->fLink->Attach<float>(startAngle);
fOwner->fLink->Attach<float>(arcAngle);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -2772,7 +2770,6 @@ BView::FillBezier(BPoint *controlPoints, const BGradient& gradient)
fOwner->fLink->Attach<BPoint>(controlPoints[1]);
fOwner->fLink->Attach<BPoint>(controlPoints[2]);
fOwner->fLink->Attach<BPoint>(controlPoints[3]);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -2874,7 +2871,6 @@ BView::FillPolygon(const BPolygon *polygon, const BGradient& gradient)
fOwner->fLink->Attach<int32>(polygon->fCount);
fOwner->fLink->Attach(polygon->fPoints,
polygon->fCount * sizeof(BPoint));
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -2987,7 +2983,6 @@ BView::FillRect(BRect rect, const BGradient& gradient)
fOwner->fLink->StartMessage(AS_FILL_RECT_GRADIENT);
fOwner->fLink->Attach<BRect>(rect);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -3046,7 +3041,6 @@ BView::FillRoundRect(BRect rect, float xRadius, float yRadius,
fOwner->fLink->Attach<BRect>(rect);
fOwner->fLink->Attach<float>(xRadius);
fOwner->fLink->Attach<float>(yRadius);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -3080,7 +3074,6 @@ BView::FillRegion(BRegion *region, const BGradient& gradient)
fOwner->fLink->StartMessage(AS_FILL_REGION_GRADIENT);
fOwner->fLink->AttachRegion(*region);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -3259,7 +3252,6 @@ BView::FillTriangle(BPoint pt1, BPoint pt2, BPoint pt3,
fOwner->fLink->Attach<BPoint>(pt2);
fOwner->fLink->Attach<BPoint>(pt3);
fOwner->fLink->Attach<BRect>(bounds);
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();
@@ -3359,7 +3351,6 @@ BView::FillShape(BShape *shape, const BGradient& gradient)
fOwner->fLink->Attach<int32>(sd->ptCount);
fOwner->fLink->Attach(sd->opList, sd->opCount * sizeof(int32));
fOwner->fLink->Attach(sd->ptList, sd->ptCount * sizeof(BPoint));
fOwner->fLink->Attach<gradient_type>(gradient.Type());
fOwner->fLink->AttachGradient(gradient);
_FlushIfNotInTransaction();