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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 2391723004: Use per-frame WebTaskRunner onImageBitmapFactories
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8c83a3d5801dc3afc0ff5443529bc2cc5b942f9..fa165b7138172df03bfadf670e5becf5f6b1fc25 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -33,6 +33,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/DOMException.h"
#include "core/dom/ExecutionContext.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/fileapi/Blob.h"
#include "core/frame/ImageBitmap.h"
#include "core/frame/LocalDOMWindow.h"
@@ -258,19 +259,19 @@ void ImageBitmapFactories::ImageBitmapLoader::scheduleAsyncImageBitmapDecoding(
if (arrayBuffer->byteLength() >= longTaskByteLengthThreshold)
taskSize = BackgroundTaskRunner::TaskSizeLongRunningTask;
WebTaskRunner* taskRunner =
- Platform::current()->currentThread()->getWebTaskRunner();
+ TaskRunnerHelper::get(TaskType::Networking, m_resolver->getScriptState());
BackgroundTaskRunner::postOnBackgroundThread(
BLINK_FROM_HERE,
crossThreadBind(
&ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread,
- wrapCrossThreadPersistent(this), crossThreadUnretained(taskRunner),
+ wrapCrossThreadPersistent(this), WTF::passed(taskRunner->clone()),
wrapCrossThreadPersistent(arrayBuffer), m_options.premultiplyAlpha(),
m_options.colorSpaceConversion()),
taskSize);
}
void ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread(
- WebTaskRunner* taskRunner,
+ std::unique_ptr<WebTaskRunner> taskRunner,
DOMArrayBuffer* arrayBuffer,
const String& premultiplyAlphaOption,
const String& colorSpaceConversionOption) {
« no previous file with comments | « third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698