mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Currently we run some tasks on the UI thread that shouldn't block the frame, such as decoding images. This patch introduces a background thread on which we can run these tasks.
32 lines
701 B
C++
32 lines
701 B
C++
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "sky/shell/ui/platform_impl.h"
|
|
|
|
#include "sky/shell/shell.h"
|
|
|
|
namespace sky {
|
|
namespace shell {
|
|
|
|
PlatformImpl::PlatformImpl() {
|
|
}
|
|
|
|
PlatformImpl::~PlatformImpl() {
|
|
}
|
|
|
|
blink::WebString PlatformImpl::defaultLocale() {
|
|
return blink::WebString::fromUTF8("en-US");
|
|
}
|
|
|
|
base::SingleThreadTaskRunner* PlatformImpl::GetUITaskRunner() {
|
|
return Shell::Shared().ui_task_runner();
|
|
}
|
|
|
|
base::SingleThreadTaskRunner* PlatformImpl::GetIOTaskRunner() {
|
|
return Shell::Shared().io_task_runner();
|
|
}
|
|
|
|
} // namespace shell
|
|
} // namespace sky
|