| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 inline HTMLCanvasElement::HTMLCanvasElement(Document& document) | 77 inline HTMLCanvasElement::HTMLCanvasElement(Document& document) |
| 78 : HTMLElement(HTMLNames::canvasTag, document) | 78 : HTMLElement(HTMLNames::canvasTag, document) |
| 79 , DocumentVisibilityObserver(document) | 79 , DocumentVisibilityObserver(document) |
| 80 , m_size(DefaultWidth, DefaultHeight) | 80 , m_size(DefaultWidth, DefaultHeight) |
| 81 , m_ignoreReset(false) | 81 , m_ignoreReset(false) |
| 82 , m_accelerationDisabled(false) | 82 , m_accelerationDisabled(false) |
| 83 , m_externallyAllocatedMemory(0) | 83 , m_externallyAllocatedMemory(0) |
| 84 , m_didFailToCreateImageBuffer(false) | 84 , m_didFailToCreateImageBuffer(false) |
| 85 , m_didClearImageBuffer(false) | 85 , m_didClearImageBuffer(false) |
| 86 { | 86 { |
| 87 ScriptWrappable::init(this); | |
| 88 } | 87 } |
| 89 | 88 |
| 90 DEFINE_NODE_FACTORY(HTMLCanvasElement) | 89 DEFINE_NODE_FACTORY(HTMLCanvasElement) |
| 91 | 90 |
| 92 HTMLCanvasElement::~HTMLCanvasElement() | 91 HTMLCanvasElement::~HTMLCanvasElement() |
| 93 { | 92 { |
| 94 resetDirtyRect(); | 93 resetDirtyRect(); |
| 95 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_external
lyAllocatedMemory); | 94 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_external
lyAllocatedMemory); |
| 96 #if !ENABLE(OILPAN) | 95 #if !ENABLE(OILPAN) |
| 97 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); | 96 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 697 } |
| 699 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); | 698 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); |
| 700 } | 699 } |
| 701 | 700 |
| 702 FloatSize HTMLCanvasElement::sourceSize() const | 701 FloatSize HTMLCanvasElement::sourceSize() const |
| 703 { | 702 { |
| 704 return FloatSize(width(), height()); | 703 return FloatSize(width(), height()); |
| 705 } | 704 } |
| 706 | 705 |
| 707 } | 706 } |
| OLD | NEW |