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/HTMLImageElement.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/html/HTMLImageElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
index 6046a9a2e50970d918b0fa402a6e69574b2755c1..60d8e4fc8fe6fce69f2b10e3c4b084f2501384c2 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
@@ -32,6 +32,7 @@
#include "core/css/parser/SizesAttributeParser.h"
#include "core/dom/Attribute.h"
#include "core/dom/NodeTraversal.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/frame/Deprecation.h"
#include "core/frame/ImageBitmap.h"
@@ -372,8 +373,10 @@ void HTMLImageElement::AttachLayoutTree(const AttachContext& context) {
blink::DeviceScaleFactorDeprecated(layout_image->GetFrame());
std::pair<Image*, float> broken_image_and_image_scale_factor =
ImageResourceContent::BrokenImage(device_scale_factor);
+ RefPtr<WebTaskRunner> task_runner = TaskRunnerHelper::Get(
+ TaskType::kAnimationTimer, &this->GetDocument());
ImageResourceContent* new_image_resource = ImageResourceContent::Create(
- broken_image_and_image_scale_factor.first);
+ task_runner, broken_image_and_image_scale_factor.first);
layout_image->ImageResource()->SetImageResource(new_image_resource);
}
if (layout_image_resource->HasImage())

Powered by Google App Engine
This is Rietveld 408576698