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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.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/core/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index 25f506b83aa45128f1a8ae2b4f01aefd364e3036..6dda048f689db62de15707c978c224d1234adb48 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -252,14 +252,6 @@ void ImageBitmapFactories::ImageBitmapLoader::didFail(FileError::ErrorCode) {
void ImageBitmapFactories::ImageBitmapLoader::scheduleAsyncImageBitmapDecoding(
DOMArrayBuffer* arrayBuffer) {
- // For a 4000*4000 png image where each 10*10 tile is filled in by a random
- // RGBA value, the byteLength is around 2M, and it typically takes around
- // 4.5ms to decode on a current model of Linux desktop.
- const int longTaskByteLengthThreshold = 2000000;
- BackgroundTaskRunner::TaskSize taskSize =
- BackgroundTaskRunner::TaskSizeShortRunningTask;
- if (arrayBuffer->byteLength() >= longTaskByteLengthThreshold)
- taskSize = BackgroundTaskRunner::TaskSizeLongRunningTask;
RefPtr<WebTaskRunner> taskRunner =
Platform::current()->currentThread()->getWebTaskRunner();
BackgroundTaskRunner::postOnBackgroundThread(
@@ -268,8 +260,7 @@ void ImageBitmapFactories::ImageBitmapLoader::scheduleAsyncImageBitmapDecoding(
&ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread,
wrapCrossThreadPersistent(this), std::move(taskRunner),
wrapCrossThreadPersistent(arrayBuffer), m_options.premultiplyAlpha(),
- m_options.colorSpaceConversion()),
- taskSize);
+ m_options.colorSpaceConversion()));
}
void ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread(

Powered by Google App Engine
This is Rietveld 408576698