| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 void OfflineAudioDestinationHandler::finishOfflineRendering() | 213 void OfflineAudioDestinationHandler::finishOfflineRendering() |
| 214 { | 214 { |
| 215 ASSERT(!isMainThread()); | 215 ASSERT(!isMainThread()); |
| 216 | 216 |
| 217 // The actual rendering has been completed. Notify the context. | 217 // The actual rendering has been completed. Notify the context. |
| 218 if (context()->getExecutionContext()) { | 218 if (context()->getExecutionContext()) { |
| 219 context()->getExecutionContext()->postTask(BLINK_FROM_HERE, | 219 context()->getExecutionContext()->postTask(BLINK_FROM_HERE, |
| 220 createCrossThreadTask(&OfflineAudioDestinationHandler::notifyComplet
e, this)); | 220 createCrossThreadTask(&OfflineAudioDestinationHandler::notifyComplet
e, AllowCrossThreadAccess(this))); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 void OfflineAudioDestinationHandler::notifySuspend(size_t frame) | 224 void OfflineAudioDestinationHandler::notifySuspend(size_t frame) |
| 225 { | 225 { |
| 226 ASSERT(isMainThread()); | 226 ASSERT(isMainThread()); |
| 227 | 227 |
| 228 if (context()) | 228 if (context()) |
| 229 context()->resolveSuspendOnMainThread(frame); | 229 context()->resolveSuspendOnMainThread(frame); |
| 230 } | 230 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 { | 311 { |
| 312 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); | 312 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); |
| 313 } | 313 } |
| 314 | 314 |
| 315 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(AbstractAudioCo
ntext* context, AudioBuffer* renderTarget) | 315 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(AbstractAudioCo
ntext* context, AudioBuffer* renderTarget) |
| 316 { | 316 { |
| 317 return new OfflineAudioDestinationNode(*context, renderTarget); | 317 return new OfflineAudioDestinationNode(*context, renderTarget); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace blink | 320 } // namespace blink |
| OLD | NEW |