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

Unified Diff: third_party/WebKit/Source/core/css/CSSImageSetValue.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/CSSImageSetValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
index a1fdbd14778d3dff499a62718d1cdd1314636808..3f5cb8ab1f2ee36007ff732fbaf08cbfd8aa95d0 100644
--- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -29,6 +29,7 @@
#include "core/css/CSSImageValue.h"
#include "core/css/CSSPrimitiveValue.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/StyleFetchedImageSet.h"
@@ -123,8 +124,11 @@ StyleImage* CSSImageSetValue::CacheImage(
document.GetSettings()->GetFetchImagePlaceholders())
params.SetAllowImagePlaceholder();
- if (ImageResourceContent* cached_image =
- ImageResourceContent::Fetch(params, document.Fetcher())) {
+ // TODO(delphick): const_cast
+ RefPtr<WebTaskRunner> task_runner = TaskRunnerHelper::Get(
Sami 2017/04/27 17:38:17 Interesting, can TaskRunnerHelper be changed to ta
Dan Elphick 2017/05/03 09:41:06 not required now we're not using getting the sched
+ TaskType::kAnimationTimer, const_cast<Document*>(&document));
+ if (ImageResourceContent* cached_image = ImageResourceContent::Fetch(
+ task_runner, params, document.Fetcher())) {
cached_image_ = StyleFetchedImageSet::Create(
cached_image, image.scale_factor, this, params.Url());
} else {

Powered by Google App Engine
This is Rietveld 408576698