app_server: make a copy of the passed BPicture
Like the AS_DRAW_PICTURE case, make a copy of the passed BPicture also for AS_CLIP_TO_PICTURE Change-Id: Id9a0adc48d73e5ec9c0d37e2ed85e30aa48369ab
This commit is contained in:
@@ -3700,12 +3700,15 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver& link)
|
||||
break;
|
||||
|
||||
ServerPicture* pictureToClip = fServerApp->GetPicture(pictureToken);
|
||||
if (pictureToClip == NULL)
|
||||
break;
|
||||
if (pictureToClip != NULL) {
|
||||
// We need to make a copy of the picture, since it can
|
||||
// change after it has been drawn
|
||||
ServerPicture* copy = App()->CreatePicture(pictureToClip);
|
||||
picture->NestPicture(copy);
|
||||
picture->WriteClipToPicture(copy->Token(), where, inverse);
|
||||
|
||||
picture->WriteClipToPicture(pictureToClip->Token(), where, inverse);
|
||||
|
||||
pictureToClip->ReleaseReference();
|
||||
pictureToClip->ReleaseReference();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user