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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } | 746 } |
747 | 747 |
748 void HTMLCanvasElement::notifySurfaceInvalid() | 748 void HTMLCanvasElement::notifySurfaceInvalid() |
749 { | 749 { |
750 if (m_context && m_context->is2d()) | 750 if (m_context && m_context->is2d()) |
751 m_context->loseContext(CanvasRenderingContext::RealLostContext); | 751 m_context->loseContext(CanvasRenderingContext::RealLostContext); |
752 } | 752 } |
753 | 753 |
754 DEFINE_TRACE(HTMLCanvasElement) | 754 DEFINE_TRACE(HTMLCanvasElement) |
755 { | 755 { |
756 #if ENABLE(OILPAN) | |
757 visitor->trace(m_observers); | |
758 visitor->trace(m_context); | 756 visitor->trace(m_context); |
759 #endif | |
760 DocumentVisibilityObserver::trace(visitor); | 757 DocumentVisibilityObserver::trace(visitor); |
761 HTMLElement::trace(visitor); | 758 HTMLElement::trace(visitor); |
762 } | 759 } |
763 | 760 |
764 void HTMLCanvasElement::updateExternallyAllocatedMemory() const | 761 void HTMLCanvasElement::updateExternallyAllocatedMemory() const |
765 { | 762 { |
766 int bufferCount = 0; | 763 int bufferCount = 0; |
767 if (m_imageBuffer) { | 764 if (m_imageBuffer) { |
768 bufferCount++; | 765 bufferCount++; |
769 if (m_imageBuffer->isAccelerated()) { | 766 if (m_imageBuffer->isAccelerated()) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 { | 943 { |
947 return FloatSize(width(), height()); | 944 return FloatSize(width(), height()); |
948 } | 945 } |
949 | 946 |
950 bool HTMLCanvasElement::isOpaque() const | 947 bool HTMLCanvasElement::isOpaque() const |
951 { | 948 { |
952 return m_context && !m_context->hasAlpha(); | 949 return m_context && !m_context->hasAlpha(); |
953 } | 950 } |
954 | 951 |
955 } // blink | 952 } // blink |
OLD | NEW |