| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 return m_context.get(); | 188 return m_context.get(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 return 0; | 191 return 0; |
| 192 } | 192 } |
| 193 | 193 |
| 194 void HTMLCanvasElement::didDraw(const FloatRect& rect) | 194 void HTMLCanvasElement::didDraw(const FloatRect& rect) |
| 195 { | 195 { |
| 196 clearCopiedImage(); | 196 clearCopiedImage(); |
| 197 | 197 |
| 198 if (hasImageBuffer()) |
| 199 m_imageBuffer->didDraw(); |
| 200 |
| 198 if (RenderBox* ro = renderBox()) { | 201 if (RenderBox* ro = renderBox()) { |
| 199 FloatRect srcRect(0, 0, size().width(), size().height()); | 202 FloatRect srcRect(0, 0, size().width(), size().height()); |
| 200 FloatRect r = rect; | 203 FloatRect r = rect; |
| 201 r.intersect(srcRect); | 204 r.intersect(srcRect); |
| 202 if (r.isEmpty() || m_dirtyRect.contains(r)) | 205 if (r.isEmpty() || m_dirtyRect.contains(r)) |
| 203 return; | 206 return; |
| 204 m_dirtyRect.unite(r); | 207 m_dirtyRect.unite(r); |
| 205 FloatRect mappedDirtyRect = mapRect(r, srcRect, ro->contentBoxRect()); | 208 FloatRect mappedDirtyRect = mapRect(r, srcRect, ro->contentBoxRect()); |
| 206 | 209 |
| 207 ro->invalidatePaintRectangle(enclosingIntRect(mappedDirtyRect)); | 210 ro->invalidatePaintRectangle(enclosingIntRect(mappedDirtyRect)); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 { | 716 { |
| 714 return !originClean(); | 717 return !originClean(); |
| 715 } | 718 } |
| 716 | 719 |
| 717 FloatSize HTMLCanvasElement::sourceSize() const | 720 FloatSize HTMLCanvasElement::sourceSize() const |
| 718 { | 721 { |
| 719 return FloatSize(width(), height()); | 722 return FloatSize(width(), height()); |
| 720 } | 723 } |
| 721 | 724 |
| 722 } | 725 } |
| OLD | NEW |