Index: content/utility/utility_thread_impl.cc |
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc |
index 4f61f4607dfb40c33565a5f688bbddd66b5f9222..ce1aa6f3a72de5161254b88344baa0f296d25f3c 100644 |
--- a/content/utility/utility_thread_impl.cc |
+++ b/content/utility/utility_thread_impl.cc |
@@ -22,7 +22,10 @@ |
#include "ipc/ipc_sync_channel.h" |
#include "ppapi/features/features.h" |
#include "services/service_manager/public/cpp/binder_registry.h" |
+#include "services/service_manager/public/cpp/interface_registry.h" |
+#include "third_party/WebKit/public/platform/WebImageGenerator.h" |
#include "third_party/WebKit/public/web/WebKit.h" |
+#include "third_party/skia/include/core/SkGraphics.h" |
#if defined(OS_POSIX) && BUILDFLAG(ENABLE_PLUGINS) |
#include "base/files/file_path.h" |
@@ -81,6 +84,12 @@ void UtilityThreadImpl::EnsureBlinkInitialized() { |
blink::Platform::Initialize(blink_platform_impl_.get()); |
} |
+void UtilityThreadImpl::EnsureReadyForSkia() { |
+ // Hook up blink's codecs so skia can call them. |
+ SkGraphics::SetImageGeneratorFromEncodedDataFactory( |
+ blink::WebImageGenerator::Create); |
+} |
+ |
void UtilityThreadImpl::Init() { |
batch_mode_ = false; |
ChildProcess::current()->AddRefProcess(); |