| 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 needToUpdate |= m_context->paintRenderingResultsToCanvas(sourceBuffer); | 943 needToUpdate |= m_context->paintRenderingResultsToCanvas(sourceBuffer); |
| 944 if (needToUpdate && buffer()) { | 944 if (needToUpdate && buffer()) { |
| 945 m_copiedImage = buffer()->newImageSnapshot(hint); | 945 m_copiedImage = buffer()->newImageSnapshot(hint); |
| 946 updateExternallyAllocatedMemory(); | 946 updateExternallyAllocatedMemory(); |
| 947 } | 947 } |
| 948 return m_copiedImage; | 948 return m_copiedImage; |
| 949 } | 949 } |
| 950 | 950 |
| 951 void HTMLCanvasElement::discardImageBuffer() | 951 void HTMLCanvasElement::discardImageBuffer() |
| 952 { | 952 { |
| 953 m_imageBuffer.clear(); | 953 m_imageBuffer.reset(); |
| 954 m_dirtyRect = FloatRect(); | 954 m_dirtyRect = FloatRect(); |
| 955 updateExternallyAllocatedMemory(); | 955 updateExternallyAllocatedMemory(); |
| 956 } | 956 } |
| 957 | 957 |
| 958 void HTMLCanvasElement::clearCopiedImage() | 958 void HTMLCanvasElement::clearCopiedImage() |
| 959 { | 959 { |
| 960 if (m_copiedImage) { | 960 if (m_copiedImage) { |
| 961 m_copiedImage.clear(); | 961 m_copiedImage.clear(); |
| 962 updateExternallyAllocatedMemory(); | 962 updateExternallyAllocatedMemory(); |
| 963 } | 963 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 return m_context->getIdFromControl(element); | 1135 return m_context->getIdFromControl(element); |
| 1136 return String(); | 1136 return String(); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 void HTMLCanvasElement::createSurfaceLayerBridge() | 1139 void HTMLCanvasElement::createSurfaceLayerBridge() |
| 1140 { | 1140 { |
| 1141 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); | 1141 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 } // namespace blink | 1144 } // namespace blink |
| OLD | NEW |