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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp

Issue 2685673005: Use TaskScheduler instead of WorkerPool in BackgroundTaskRunner.cpp (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
index 263dcc33890581155a75817dd2d21fb456e4667f..dbf0ab2a170178b49d1983c48da589d732c96ea5 100644
--- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
@@ -38,12 +38,6 @@
namespace blink {
-// This threshold is determined by the assumption that the target audio
-// file is compressed in AAC or MP3. The decoding time varies upon different
-// audio file encoding types, but it is fair to assume the usage of compressed
-// file.
-static const unsigned kTaskSizeThresholdInByte = 512000;
-
void AsyncAudioDecoder::decodeAsync(DOMArrayBuffer* audioData,
float sampleRate,
AudioBufferCallback* successCallback,
@@ -55,10 +49,6 @@ void AsyncAudioDecoder::decodeAsync(DOMArrayBuffer* audioData,
if (!audioData)
return;
- BackgroundTaskRunner::TaskSize taskSize =
- audioData->byteLength() < kTaskSizeThresholdInByte
- ? BackgroundTaskRunner::TaskSizeShortRunningTask
- : BackgroundTaskRunner::TaskSizeLongRunningTask;
BackgroundTaskRunner::postOnBackgroundThread(
BLINK_FROM_HERE,
crossThreadBind(&AsyncAudioDecoder::decodeOnBackgroundThread,
@@ -66,8 +56,7 @@ void AsyncAudioDecoder::decodeAsync(DOMArrayBuffer* audioData,
wrapCrossThreadPersistent(successCallback),
wrapCrossThreadPersistent(errorCallback),
wrapCrossThreadPersistent(resolver),
- wrapCrossThreadPersistent(context)),
- taskSize);
+ wrapCrossThreadPersistent(context)));
}
void AsyncAudioDecoder::decodeOnBackgroundThread(

Powered by Google App Engine
This is Rietveld 408576698