mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Instead of joining the UI thread to copy data from the network into a buffer, we now drain the data pipe for image decoding on a background thread.
21 lines
607 B
C++
21 lines
607 B
C++
// Copyright 2013 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_ENGINE_PLATFORM_MOJO_DATA_PIPE_H_
|
|
#define SKY_ENGINE_PLATFORM_MOJO_DATA_PIPE_H_
|
|
|
|
#include "base/callback.h"
|
|
#include "mojo/public/cpp/system/core.h"
|
|
#include "sky/engine/platform/SharedBuffer.h"
|
|
|
|
namespace blink {
|
|
|
|
void DrainDataPipeInBackground(
|
|
mojo::ScopedDataPipeConsumerHandle handle,
|
|
base::Callback<void(PassRefPtr<SharedBuffer>)> callback);
|
|
|
|
} // namespace blink
|
|
|
|
#endif // SKY_ENGINE_PLATFORM_MOJO_DATA_PIPE_H_
|