| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 } | 518 } |
| 519 | 519 |
| 520 void HTMLCanvasElement::notifySurfaceInvalid() | 520 void HTMLCanvasElement::notifySurfaceInvalid() |
| 521 { | 521 { |
| 522 if (m_context && m_context->is2d()) { | 522 if (m_context && m_context->is2d()) { |
| 523 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); | 523 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); |
| 524 context2d->loseContext(); | 524 context2d->loseContext(); |
| 525 } | 525 } |
| 526 } | 526 } |
| 527 | 527 |
| 528 void HTMLCanvasElement::trace(Visitor* visitor) |
| 529 { |
| 530 visitor->trace(m_context); |
| 531 HTMLElement::trace(visitor); |
| 532 } |
| 533 |
| 528 void HTMLCanvasElement::updateExternallyAllocatedMemory() const | 534 void HTMLCanvasElement::updateExternallyAllocatedMemory() const |
| 529 { | 535 { |
| 530 int bufferCount = 0; | 536 int bufferCount = 0; |
| 531 if (m_imageBuffer) | 537 if (m_imageBuffer) |
| 532 bufferCount++; | 538 bufferCount++; |
| 533 if (is3D()) | 539 if (is3D()) |
| 534 bufferCount += 2; | 540 bufferCount += 2; |
| 535 if (m_copiedImage) | 541 if (m_copiedImage) |
| 536 bufferCount++; | 542 bufferCount++; |
| 537 if (m_presentedImage) | 543 if (m_presentedImage) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 { | 690 { |
| 685 return !originClean(); | 691 return !originClean(); |
| 686 } | 692 } |
| 687 | 693 |
| 688 FloatSize HTMLCanvasElement::sourceSize() const | 694 FloatSize HTMLCanvasElement::sourceSize() const |
| 689 { | 695 { |
| 690 return FloatSize(width(), height()); | 696 return FloatSize(width(), height()); |
| 691 } | 697 } |
| 692 | 698 |
| 693 } | 699 } |
| OLD | NEW |