OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 SecurityOrigin* securityOrigin() const; | 119 SecurityOrigin* securityOrigin() const; |
120 void setOriginTainted() { m_originClean = false; } | 120 void setOriginTainted() { m_originClean = false; } |
121 bool originClean() const { return m_originClean; } | 121 bool originClean() const { return m_originClean; } |
122 | 122 |
123 StyleResolver* styleResolver(); | 123 StyleResolver* styleResolver(); |
124 | 124 |
125 AffineTransform baseTransform() const; | 125 AffineTransform baseTransform() const; |
126 | 126 |
127 bool is3D() const; | 127 bool is3D() const; |
128 | 128 |
129 bool hasCreatedImageBuffer() const { return m_hasCreatedImageBuffer; } | |
130 | |
131 bool shouldAccelerate(const IntSize&) const; | 129 bool shouldAccelerate(const IntSize&) const; |
132 | 130 |
133 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 131 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
134 | 132 |
135 InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 133 InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
136 | 134 |
137 private: | 135 private: |
138 HTMLCanvasElement(const QualifiedName&, Document&); | 136 HTMLCanvasElement(const QualifiedName&, Document&); |
139 | 137 |
140 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; | 138 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; |
(...skipping 21 matching lines...) Expand all Loading... | |
162 | 160 |
163 bool m_ignoreReset; | 161 bool m_ignoreReset; |
164 bool m_accelerationDisabled; | 162 bool m_accelerationDisabled; |
165 FloatRect m_dirtyRect; | 163 FloatRect m_dirtyRect; |
166 | 164 |
167 intptr_t m_externallyAllocatedMemory; | 165 intptr_t m_externallyAllocatedMemory; |
168 | 166 |
169 float m_deviceScaleFactor; // FIXME: This is always 1 and should probable be deleted | 167 float m_deviceScaleFactor; // FIXME: This is always 1 and should probable be deleted |
170 bool m_originClean; | 168 bool m_originClean; |
171 | 169 |
172 // m_createdImageBuffer means we tried to malloc the buffer. We didn't nece ssarily get it. | 170 // m_createdImageBuffer means we tried to malloc the buffer. We didn't nece ssarily get it. |
aandrey
2013/10/25 20:03:35
is this comment still relevant?
| |
173 mutable bool m_hasCreatedImageBuffer; | |
174 mutable bool m_didClearImageBuffer; | 171 mutable bool m_didClearImageBuffer; |
175 OwnPtr<ImageBuffer> m_imageBuffer; | 172 OwnPtr<ImageBuffer> m_imageBuffer; |
176 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; | 173 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; |
177 | 174 |
178 mutable RefPtr<Image> m_presentedImage; | 175 mutable RefPtr<Image> m_presentedImage; |
179 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). | 176 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). |
180 }; | 177 }; |
181 | 178 |
182 DEFINE_NODE_TYPE_CASTS(HTMLCanvasElement, hasTagName(HTMLNames::canvasTag)); | 179 DEFINE_NODE_TYPE_CASTS(HTMLCanvasElement, hasTagName(HTMLNames::canvasTag)); |
183 | 180 |
184 } //namespace | 181 } //namespace |
185 | 182 |
186 #endif | 183 #endif |
OLD | NEW |