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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp
index 4050fa6c3734973d5e2f155e688fc6fc187e4f90..a4b809f4aab55537f7650293aad7220b5fdf560f 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp
@@ -29,10 +29,6 @@ namespace {
const double SlackBeforeDeadline =
0.001; // a small slack period between deadline and current time for safety
const int NumChannelsPng = 4;
-const int LongTaskImageSizeThreshold =
- 1000 *
- 1000; // The max image size we expect to encode in 14ms on Linux in PNG
- // format
// The encoding task is highly likely to switch from idle task to alternative
// code path when the startTimeoutDelay is set to be below 150ms. As we want the
@@ -252,15 +248,10 @@ void CanvasAsyncBlobCreator::scheduleAsyncBlobCreation(const double& quality) {
wrapPersistent(this)));
} else {
- BackgroundTaskRunner::TaskSize taskSize =
- (m_size.height() * m_size.width() >= LongTaskImageSizeThreshold)
- ? BackgroundTaskRunner::TaskSizeLongRunningTask
- : BackgroundTaskRunner::TaskSizeShortRunningTask;
BackgroundTaskRunner::postOnBackgroundThread(
BLINK_FROM_HERE,
crossThreadBind(&CanvasAsyncBlobCreator::encodeImageOnEncoderThread,
- wrapCrossThreadPersistent(this), quality),
- taskSize);
+ wrapCrossThreadPersistent(this), quality));
}
} else {
m_idleTaskStatus = IdleTaskNotStarted;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698