Adam Barth 1888eacb75 Drain data pipe for images no a background thread
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.
2015-10-09 07:25:54 -07:00

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_