1120cfc62SIngo Weinhold /*
2120cfc62SIngo Weinhold * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3120cfc62SIngo Weinhold * Distributed under the terms of the MIT License.
4120cfc62SIngo Weinhold */
5120cfc62SIngo Weinhold
6120cfc62SIngo Weinhold #include "Image.h"
7120cfc62SIngo Weinhold
8120cfc62SIngo Weinhold
Image(SharedImage * image,const image_info & info,team_id owner,int32 creationEvent)9afa231acSIngo Weinhold Image::Image(SharedImage* image, const image_info& info, team_id owner,
10afa231acSIngo Weinhold int32 creationEvent)
11120cfc62SIngo Weinhold :
12afa231acSIngo Weinhold fImage(image),
13afa231acSIngo Weinhold fID(info.id),
14120cfc62SIngo Weinhold fOwner(owner),
15afa231acSIngo Weinhold fLoadDelta((addr_t)info.text - (addr_t)image->Info().text),
16120cfc62SIngo Weinhold fCreationEvent(creationEvent),
17120cfc62SIngo Weinhold fDeletionEvent(-1)
18120cfc62SIngo Weinhold {
19*756b64fdSIngo Weinhold fImage->AcquireReference();
20120cfc62SIngo Weinhold }
21120cfc62SIngo Weinhold
22120cfc62SIngo Weinhold
~Image()23120cfc62SIngo Weinhold Image::~Image()
24120cfc62SIngo Weinhold {
25*756b64fdSIngo Weinhold fImage->ReleaseReference();
26120cfc62SIngo Weinhold }
27