flutter_flutter/sky/shell/ui/platform_impl.h
Adam Barth 1946924b16 Introduce IO thread for background tasks
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.
2015-10-09 06:37:57 -07:00

33 lines
820 B
C++

// Copyright 2014 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.
#ifndef SKY_SHELL_UI_PLATFORM_IMPL_H_
#define SKY_SHELL_UI_PLATFORM_IMPL_H_
#include "base/message_loop/message_loop.h"
#include "sky/engine/public/platform/Platform.h"
namespace sky {
namespace shell {
class PlatformImpl : public blink::Platform {
public:
explicit PlatformImpl();
~PlatformImpl() override;
// blink::Platform methods:
blink::WebString defaultLocale() override;
base::SingleThreadTaskRunner* GetUITaskRunner() override;
base::SingleThreadTaskRunner* GetIOTaskRunner() override;
private:
DISALLOW_COPY_AND_ASSIGN(PlatformImpl);
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_UI_PLATFORM_IMPL_H_