| Index: content/renderer/gpu/render_widget_compositor.cc
|
| diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
|
| index 1cf1b5318b176cbb1eefc8fa28e5b2f7fe536704..a5c0208810ef3ea9aac5c476738362ad64af16fa 100644
|
| --- a/content/renderer/gpu/render_widget_compositor.cc
|
| +++ b/content/renderer/gpu/render_widget_compositor.cc
|
| @@ -66,6 +66,7 @@
|
| #include "third_party/WebKit/public/web/WebKit.h"
|
| #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
|
| #include "third_party/WebKit/public/web/WebSelection.h"
|
| +#include "third_party/skia/include/core/SkImage.h"
|
| #include "ui/gl/gl_switches.h"
|
| #include "ui/native_theme/native_theme_switches.h"
|
| #include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
| @@ -1029,6 +1030,23 @@ void RenderWidgetCompositor::setBottomControlsHeight(float height) {
|
| layer_tree_host_->SetBottomControlsHeight(height);
|
| }
|
|
|
| +void RenderWidgetCompositor::RequestDecode(
|
| + sk_sp<SkImage> image,
|
| + const base::Callback<void(bool)>& callback) {
|
| + layer_tree_host_->QueueImageDecode(std::move(image), callback);
|
| +
|
| + // If we're compositing synchronously, the SetNeedsCommit call which will be
|
| + // issued by |layer_tree_host_| is not going to cause a commit, due to the
|
| + // fact that this would make layout tests slow and cause flakiness. However,
|
| + // in this case we actually need a commit to transfer the decode requests to
|
| + // the impl side. So, force a commit to happen.
|
| + if (CompositeIsSynchronous()) {
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE, base::Bind(&RenderWidgetCompositor::SynchronouslyComposite,
|
| + weak_factory_.GetWeakPtr()));
|
| + }
|
| +}
|
| +
|
| void RenderWidgetCompositor::WillBeginMainFrame() {
|
| delegate_->WillBeginCompositorFrame();
|
| }
|
|
|