| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 if (!m_didClearImageBuffer) | 270 if (!m_didClearImageBuffer) |
| 271 clearImageBuffer(); | 271 clearImageBuffer(); |
| 272 return; | 272 return; |
| 273 } | 273 } |
| 274 | 274 |
| 275 setSurfaceSize(newSize); | 275 setSurfaceSize(newSize); |
| 276 | 276 |
| 277 if (m_context && m_context->is3d() && oldSize != size()) | 277 if (m_context && m_context->is3d() && oldSize != size()) |
| 278 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); | 278 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); |
| 279 | 279 |
| 280 if (RenderObject* renderer = this->renderer()) { | |
| 281 if (renderer->isCanvas()) { | |
| 282 if (hadImageBuffer) | |
| 283 renderer->setShouldDoFullPaintInvalidation(true); | |
| 284 } | |
| 285 } | |
| 286 | |
| 287 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); | 280 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); |
| 288 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) | 281 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) |
| 289 (*it)->canvasResized(this); | 282 (*it)->canvasResized(this); |
| 290 } | 283 } |
| 291 | 284 |
| 292 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const | 285 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const |
| 293 { | 286 { |
| 294 ASSERT(m_context); | 287 ASSERT(m_context); |
| 295 | 288 |
| 296 if (!m_context->isAccelerated()) | 289 if (!m_context->isAccelerated()) |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 } | 653 } |
| 661 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); | 654 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); |
| 662 } | 655 } |
| 663 | 656 |
| 664 FloatSize HTMLCanvasElement::sourceSize() const | 657 FloatSize HTMLCanvasElement::sourceSize() const |
| 665 { | 658 { |
| 666 return FloatSize(width(), height()); | 659 return FloatSize(width(), height()); |
| 667 } | 660 } |
| 668 | 661 |
| 669 } | 662 } |
| OLD | NEW |