| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/offscreencanvas/OffscreenCanvas.h" | 5 #include "core/offscreencanvas/OffscreenCanvas.h" |
| 6 | 6 |
| 7 #include "core/dom/ExceptionCode.h" | 7 #include "core/dom/ExceptionCode.h" |
| 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 9 #include "core/html/canvas/CanvasRenderingContext.h" | 9 #include "core/html/canvas/CanvasRenderingContext.h" |
| 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool OffscreenCanvas::isAccelerated() const { | 171 bool OffscreenCanvas::isAccelerated() const { |
| 172 return m_context && m_context->isAccelerated(); | 172 return m_context && m_context->isAccelerated(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 OffscreenCanvasFrameDispatcher* OffscreenCanvas::getOrCreateFrameDispatcher() { | 175 OffscreenCanvasFrameDispatcher* OffscreenCanvas::getOrCreateFrameDispatcher() { |
| 176 if (!m_frameDispatcher) { | 176 if (!m_frameDispatcher) { |
| 177 // The frame dispatcher connects the current thread of OffscreenCanvas | 177 // The frame dispatcher connects the current thread of OffscreenCanvas |
| 178 // (either main or worker) to the browser process and remains unchanged | 178 // (either main or worker) to the browser process and remains unchanged |
| 179 // throughout the lifetime of this OffscreenCanvas. | 179 // throughout the lifetime of this OffscreenCanvas. |
| 180 m_frameDispatcher = wrapUnique(new OffscreenCanvasFrameDispatcherImpl( | 180 m_frameDispatcher = wrapUnique(new OffscreenCanvasFrameDispatcherImpl( |
| 181 m_clientId, m_sinkId, m_localId, m_nonce, width(), height())); | 181 m_clientId, m_sinkId, m_localId, m_nonceHigh, m_nonceLow, width(), |
| 182 height())); |
| 182 } | 183 } |
| 183 return m_frameDispatcher.get(); | 184 return m_frameDispatcher.get(); |
| 184 } | 185 } |
| 185 | 186 |
| 186 DEFINE_TRACE(OffscreenCanvas) { | 187 DEFINE_TRACE(OffscreenCanvas) { |
| 187 visitor->trace(m_context); | 188 visitor->trace(m_context); |
| 188 } | 189 } |
| 189 | 190 |
| 190 } // namespace blink | 191 } // namespace blink |
| OLD | NEW |