Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: Source/modules/webaudio/DeferredTaskHandler.h

Issue 1140723003: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a LO test and minor nits Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void clearHandlersToBeDeleted(); 95 void clearHandlersToBeDeleted();
96 96
97 // 97 //
98 // Thread Safety and Graph Locking: 98 // Thread Safety and Graph Locking:
99 // 99 //
100 void setAudioThread(ThreadIdentifier thread) { m_audioThread = thread; } // FIXME: check either not initialized or the same 100 void setAudioThread(ThreadIdentifier thread) { m_audioThread = thread; } // FIXME: check either not initialized or the same
101 ThreadIdentifier audioThread() const { return m_audioThread; } 101 ThreadIdentifier audioThread() const { return m_audioThread; }
102 bool isAudioThread() const; 102 bool isAudioThread() const;
103 103
104 void lock(); 104 void lock();
105 void forceLock();
105 bool tryLock(); 106 bool tryLock();
106 void unlock(); 107 void unlock();
107 #if ENABLE(ASSERT) 108 #if ENABLE(ASSERT)
108 // Returns true if this thread owns the context's lock. 109 // Returns true if this thread owns the context's lock.
109 bool isGraphOwner(); 110 bool isGraphOwner();
110 #endif 111 #endif
111 112
112 class MODULES_EXPORT AutoLocker { 113 class MODULES_EXPORT AutoLocker {
113 STACK_ALLOCATED(); 114 STACK_ALLOCATED();
114 public: 115 public:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers; 160 Vector<RefPtr<AudioHandler>> m_deletableOrphanHandlers;
160 161
161 // Graph locking. 162 // Graph locking.
162 RecursiveMutex m_contextGraphMutex; 163 RecursiveMutex m_contextGraphMutex;
163 volatile ThreadIdentifier m_audioThread; 164 volatile ThreadIdentifier m_audioThread;
164 }; 165 };
165 166
166 } // namespace blink 167 } // namespace blink
167 168
168 #endif // DeferredTaskHandler_h 169 #endif // DeferredTaskHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698