xref: /haiku/src/bin/debug/profile/Image.cpp (revision 756b64fd836dad5b63f41f0b01f8cedfec795f9d)
1 /*
2  * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include "Image.h"
7 
8 
Image(SharedImage * image,const image_info & info,team_id owner,int32 creationEvent)9 Image::Image(SharedImage* image, const image_info& info, team_id owner,
10 	int32 creationEvent)
11 	:
12 	fImage(image),
13 	fID(info.id),
14 	fOwner(owner),
15 	fLoadDelta((addr_t)info.text - (addr_t)image->Info().text),
16 	fCreationEvent(creationEvent),
17 	fDeletionEvent(-1)
18 {
19 	fImage->AcquireReference();
20 }
21 
22 
~Image()23 Image::~Image()
24 {
25 	fImage->ReleaseReference();
26 }
27