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

Unified Diff: third_party/WebKit/Source/core/css/CSSImageValue.cpp

Issue 2810423003: Schedule bitmap animation timers on the compositor task runner. (Closed)
Patch Set: fix up comment about a method changed by blink reformat Created 3 years, 8 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/css/CSSImageValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index be304a481be2bf462db677ed3a1749a2f793a5c5..10f88c008e1a77a190f00677769f56194af7a5a7 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -22,6 +22,7 @@
#include "core/css/CSSMarkup.h"
#include "core/dom/Document.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/frame/Settings.h"
#include "core/loader/resource/ImageResourceContent.h"
#include "core/style/StyleFetchedImage.h"
@@ -72,8 +73,10 @@ StyleImage* CSSImageValue::CacheImage(const Document& document,
document.GetSettings()->GetFetchImagePlaceholders())
params.SetAllowImagePlaceholder();
- if (ImageResourceContent* cached_image =
- ImageResourceContent::Fetch(params, document.Fetcher())) {
+ RefPtr<WebTaskRunner> task_runner = TaskRunnerHelper::Get(
+ TaskType::kAnimationTimer, const_cast<Document*>(&document));
+ if (ImageResourceContent* cached_image = ImageResourceContent::Fetch(
+ task_runner, params, document.Fetcher())) {
cached_image_ =
StyleFetchedImage::Create(cached_image, document, params.Url());
} else {

Powered by Google App Engine
This is Rietveld 408576698