| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return StaticBitmapImage::create(surface->makeImageSnapshot()); | 121 return StaticBitmapImage::create(surface->makeImageSnapshot()); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 inline HTMLCanvasElement::HTMLCanvasElement(Document& document) | 126 inline HTMLCanvasElement::HTMLCanvasElement(Document& document) |
| 127 : HTMLElement(canvasTag, document), | 127 : HTMLElement(canvasTag, document), |
| 128 ContextLifecycleObserver(&document), | 128 ContextLifecycleObserver(&document), |
| 129 PageVisibilityObserver(document.page()), | 129 PageVisibilityObserver(document.page()), |
| 130 m_size(DefaultWidth, DefaultHeight), | 130 m_size(DefaultWidth, DefaultHeight), |
| 131 m_context(this, nullptr), |
| 131 m_ignoreReset(false), | 132 m_ignoreReset(false), |
| 132 m_externallyAllocatedMemory(0), | 133 m_externallyAllocatedMemory(0), |
| 133 m_originClean(true), | 134 m_originClean(true), |
| 134 m_didFailToCreateImageBuffer(false), | 135 m_didFailToCreateImageBuffer(false), |
| 135 m_imageBufferIsClear(false), | 136 m_imageBufferIsClear(false), |
| 136 m_numFramesSinceLastRenderingModeSwitch(0), | 137 m_numFramesSinceLastRenderingModeSwitch(0), |
| 137 m_pendingRenderingModeSwitch(false) { | 138 m_pendingRenderingModeSwitch(false) { |
| 138 CanvasMetrics::countCanvasContextUsage(CanvasMetrics::CanvasCreated); | 139 CanvasMetrics::countCanvasContextUsage(CanvasMetrics::CanvasCreated); |
| 139 UseCounter::count(document, UseCounter::HTMLCanvasElement); | 140 UseCounter::count(document, UseCounter::HTMLCanvasElement); |
| 140 } | 141 } |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 mojom::blink::OffscreenCanvasSurfacePtr service; | 1440 mojom::blink::OffscreenCanvasSurfacePtr service; |
| 1440 Platform::current()->interfaceProvider()->getInterface( | 1441 Platform::current()->interfaceProvider()->getInterface( |
| 1441 mojo::GetProxy(&service)); | 1442 mojo::GetProxy(&service)); |
| 1442 m_surfaceLayerBridge = | 1443 m_surfaceLayerBridge = |
| 1443 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); | 1444 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); |
| 1444 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), | 1445 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), |
| 1445 this->height()); | 1446 this->height()); |
| 1446 } | 1447 } |
| 1447 | 1448 |
| 1448 } // namespace blink | 1449 } // namespace blink |
| OLD | NEW |