| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 } | 535 } |
| 536 | 536 |
| 537 void HTMLCanvasElement::notifySurfaceInvalid() | 537 void HTMLCanvasElement::notifySurfaceInvalid() |
| 538 { | 538 { |
| 539 if (m_context && m_context->is2d()) { | 539 if (m_context && m_context->is2d()) { |
| 540 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); | 540 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); |
| 541 context2d->loseContext(); | 541 context2d->loseContext(); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 | 544 |
| 545 void HTMLCanvasElement::trace(Visitor* visitor) | |
| 546 { | |
| 547 #if ENABLE(OILPAN) | |
| 548 visitor->trace(m_observers); | |
| 549 visitor->trace(m_context); | |
| 550 #endif | |
| 551 DocumentVisibilityObserver::trace(visitor); | |
| 552 HTMLElement::trace(visitor); | |
| 553 } | |
| 554 | |
| 555 void HTMLCanvasElement::updateExternallyAllocatedMemory() const | 545 void HTMLCanvasElement::updateExternallyAllocatedMemory() const |
| 556 { | 546 { |
| 557 int bufferCount = 0; | 547 int bufferCount = 0; |
| 558 if (m_imageBuffer) | 548 if (m_imageBuffer) |
| 559 bufferCount++; | 549 bufferCount++; |
| 560 if (is3D()) | 550 if (is3D()) |
| 561 bufferCount += 2; | 551 bufferCount += 2; |
| 562 if (m_copiedImage) | 552 if (m_copiedImage) |
| 563 bufferCount++; | 553 bufferCount++; |
| 564 if (m_presentedImage) | 554 if (m_presentedImage) |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 } | 698 } |
| 709 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); | 699 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); |
| 710 } | 700 } |
| 711 | 701 |
| 712 FloatSize HTMLCanvasElement::sourceSize() const | 702 FloatSize HTMLCanvasElement::sourceSize() const |
| 713 { | 703 { |
| 714 return FloatSize(width(), height()); | 704 return FloatSize(width(), height()); |
| 715 } | 705 } |
| 716 | 706 |
| 717 } | 707 } |
| OLD | NEW |