OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "config.h" | 27 #include "config.h" |
28 #include "Image.h" | 28 #include "Image.h" |
29 | 29 |
30 #include "AffineTransform.h" | 30 #include "AffineTransform.h" |
31 #include "BitmapImage.h" | 31 #include "BitmapImage.h" |
32 #include "GraphicsContext.h" | 32 #include "GraphicsContext.h" |
33 #include "ImageObserver.h" | 33 #include "ImageObserver.h" |
34 #include "IntRect.h" | 34 #include "IntRect.h" |
35 #include "Length.h" | 35 #include "Length.h" |
36 #include "MIMETypeRegistry.h" | 36 #include "MIMETypeRegistry.h" |
37 #include "PlatformMemoryInstrumentation.h" | |
38 #include "SharedBuffer.h" | 37 #include "SharedBuffer.h" |
39 #include <math.h> | 38 #include <math.h> |
40 #include <wtf/MainThread.h> | 39 #include <wtf/MainThread.h> |
41 #include <wtf/MemoryObjectInfo.h> | |
42 #include <wtf/StdLibExtras.h> | 40 #include <wtf/StdLibExtras.h> |
43 | 41 |
44 namespace WebCore { | 42 namespace WebCore { |
45 | 43 |
46 Image::Image(ImageObserver* observer) | 44 Image::Image(ImageObserver* observer) |
47 : m_imageObserver(observer) | 45 : m_imageObserver(observer) |
48 { | 46 { |
49 } | 47 } |
50 | 48 |
51 Image::~Image() | 49 Image::~Image() |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 184 } |
187 #endif | 185 #endif |
188 | 186 |
189 void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsic
Height, FloatSize& intrinsicRatio) | 187 void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsic
Height, FloatSize& intrinsicRatio) |
190 { | 188 { |
191 intrinsicRatio = size(); | 189 intrinsicRatio = size(); |
192 intrinsicWidth = Length(intrinsicRatio.width(), Fixed); | 190 intrinsicWidth = Length(intrinsicRatio.width(), Fixed); |
193 intrinsicHeight = Length(intrinsicRatio.height(), Fixed); | 191 intrinsicHeight = Length(intrinsicRatio.height(), Fixed); |
194 } | 192 } |
195 | 193 |
196 void Image::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | |
197 { | |
198 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); | |
199 memoryObjectInfo->setClassName("Image"); | |
200 info.addMember(m_encodedImageData, "encodedImageData"); | |
201 info.addWeakPointer(m_imageObserver); | |
202 } | 194 } |
203 | |
204 } | |
OLD | NEW |