提交 cfcf10bb 编写于 作者: C Chinmay Garde 提交者: GitHub

Call SkGraphics::Init on shell initialization. (#3628)

This ensures SkOpts are initialized before we start using Skia.
上级 ce9251b3
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "flutter/shell/common/skia_event_tracer_impl.h" #include "flutter/shell/common/skia_event_tracer_impl.h"
#include "flutter/shell/common/switches.h" #include "flutter/shell/common/switches.h"
#include "lib/ftl/files/unique_fd.h" #include "lib/ftl/files/unique_fd.h"
#include "third_party/skia/include/core/SkGraphics.h"
namespace shell { namespace shell {
namespace { namespace {
...@@ -100,6 +101,8 @@ void Shell::InitStandalone(ftl::CommandLine command_line, ...@@ -100,6 +101,8 @@ void Shell::InitStandalone(ftl::CommandLine command_line,
fml::icu::InitializeICU(icu_data_path); fml::icu::InitializeICU(icu_data_path);
SkGraphics::Init();
blink::Settings settings; blink::Settings settings;
settings.application_library_path = application_library_path; settings.application_library_path = application_library_path;
......
...@@ -101,12 +101,12 @@ bool IOSSurfaceSoftware::PresentBackingStore(sk_sp<SkSurface> backing_store) { ...@@ -101,12 +101,12 @@ bool IOSSurfaceSoftware::PresentBackingStore(sk_sp<SkSurface> backing_store) {
} }
// Create the CGImageRef representation on the pixmap. // Create the CGImageRef representation on the pixmap.
fml::CFRef<CGImageRef> pixmap_image(CGImageCreate(pixmap.width(), // width fml::CFRef<CGImageRef> pixmap_image(CGImageCreate(pixmap.width(), // width
pixmap.height(), // height pixmap.height(), // height
8, // bits per component 8, // bits per component
32, // bits per pixel 32, // bits per pixel
4 * pixmap.width(), // bytes per row pixmap.rowBytes(), // bytes per row
colorspace, // colorspace colorspace, // colorspace
kCGImageAlphaPremultipliedLast, // bitmap info kCGImageAlphaPremultipliedLast, // bitmap info
pixmap_data_provider, // data provider pixmap_data_provider, // data provider
nullptr, // decode array nullptr, // decode array
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册