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