| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) { | 280 if (RenderObject* renderer = this->renderer()) { |
| 281 if (renderer->isCanvas()) { | 281 if (renderer->isCanvas()) { |
| 282 if (hadImageBuffer) | 282 if (hadImageBuffer) |
| 283 renderer->setShouldDoFullPaintInvalidation(true); | 283 renderer->scheduleVisualUpdate(); |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); | 287 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); |
| 288 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) | 288 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) |
| 289 (*it)->canvasResized(this); | 289 (*it)->canvasResized(this); |
| 290 } | 290 } |
| 291 | 291 |
| 292 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const | 292 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const |
| 293 { | 293 { |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 } | 660 } |
| 661 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); | 661 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); |
| 662 } | 662 } |
| 663 | 663 |
| 664 FloatSize HTMLCanvasElement::sourceSize() const | 664 FloatSize HTMLCanvasElement::sourceSize() const |
| 665 { | 665 { |
| 666 return FloatSize(width(), height()); | 666 return FloatSize(width(), height()); |
| 667 } | 667 } |
| 668 | 668 |
| 669 } | 669 } |
| OLD | NEW |