@@ -47,7 +47,7 @@ void PlatformView::CreateEngine() {
4747void PlatformView::DispatchPlatformMessage (
4848 fxl::RefPtr<blink::PlatformMessage> message) {
4949 blink::Threads::UI ()->PostTask (
50- [ engine = engine_->GetWeakPtr (), message = std::move (message) ] {
50+ [engine = engine_->GetWeakPtr (), message = std::move (message)] {
5151 if (engine) {
5252 engine->DispatchPlatformMessage (message);
5353 }
@@ -58,7 +58,7 @@ void PlatformView::DispatchSemanticsAction(int32_t id,
5858 blink::SemanticsAction action,
5959 std::vector<uint8_t > args) {
6060 blink::Threads::UI ()->PostTask (
61- [ engine = engine_->GetWeakPtr (), id, action, args = std::move (args) ] {
61+ [engine = engine_->GetWeakPtr (), id, action, args = std::move (args)] {
6262 if (engine) {
6363 engine->DispatchSemanticsAction (
6464 id, static_cast <blink::SemanticsAction>(action), std::move (args));
@@ -67,7 +67,7 @@ void PlatformView::DispatchSemanticsAction(int32_t id,
6767}
6868
6969void PlatformView::SetSemanticsEnabled (bool enabled) {
70- blink::Threads::UI ()->PostTask ([ engine = engine_->GetWeakPtr (), enabled ] {
70+ blink::Threads::UI ()->PostTask ([engine = engine_->GetWeakPtr (), enabled] {
7171 if (engine)
7272 engine->SetSemanticsEnabled (enabled);
7373 });
@@ -81,18 +81,14 @@ void PlatformView::NotifyCreated(std::unique_ptr<Surface> surface,
8181 fxl::Closure caller_continuation) {
8282 fxl::AutoResetWaitableEvent latch;
8383
84- auto ui_continuation = fxl::MakeCopyable ([
85- this , //
86- surface = std::move (surface), //
87- caller_continuation, //
88- &latch
89- ]() mutable {
90- auto gpu_continuation = fxl::MakeCopyable ([
91- this , //
92- surface = std::move (surface), //
93- caller_continuation, //
94- &latch
95- ]() mutable {
84+ auto ui_continuation = fxl::MakeCopyable ([this , //
85+ surface = std::move (surface), //
86+ caller_continuation, //
87+ &latch]() mutable {
88+ auto gpu_continuation = fxl::MakeCopyable ([this , //
89+ surface = std::move (surface), //
90+ caller_continuation, //
91+ &latch]() mutable {
9692 // Runs on the GPU Thread. So does the Caller Continuation.
9793 rasterizer_->Setup (std::move (surface), caller_continuation, &latch);
9894 });
@@ -195,10 +191,8 @@ void PlatformView::SetupResourceContextOnIOThreadPerform(
195191 // that feature, which will cause texture uploads to do CPU YUV conversion.
196192 options.fDisableGpuYUVConversion = true ;
197193
198- blink::ResourceContext::Set (GrContext::Create (
199- GrBackend::kOpenGL_GrBackend ,
200- reinterpret_cast <GrBackendContext>(GrGLCreateNativeInterface ()),
201- options));
194+ blink::ResourceContext::Set (
195+ GrContext::MakeGL (GrGLMakeNativeInterface (), options));
202196
203197 // Do not cache textures created by the image decoder. These textures should
204198 // be deleted when they are no longer referenced by an SkImage.
0 commit comments