| Index: cc/ipc/copy_output_request_struct_traits.cc
|
| diff --git a/cc/ipc/copy_output_request_struct_traits.cc b/cc/ipc/copy_output_request_struct_traits.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3985ba41eb744a7c114458b4bc94e1c8b26ce9b8
|
| --- /dev/null
|
| +++ b/cc/ipc/copy_output_request_struct_traits.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2017 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 "cc/ipc/copy_output_request_struct_traits.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +// static
|
| +bool StructTraits<cc::mojom::CopyOutputRequestDataView,
|
| + std::unique_ptr<cc::CopyOutputRequest>>::
|
| + Read(cc::mojom::CopyOutputRequestDataView data,
|
| + std::unique_ptr<cc::CopyOutputRequest>* out_p) {
|
| + auto request = cc::CopyOutputRequest::CreateEmptyRequest();
|
| +
|
| + request->force_bitmap_result_ = data.force_bitmap_result();
|
| +
|
| + if (!data.ReadSource(&request->source_))
|
| + return false;
|
| +
|
| + if (!data.ReadArea(&request->area_))
|
| + return false;
|
| +
|
| + if (!data.ReadTextureMailbox(&request->texture_mailbox_))
|
| + return false;
|
| +
|
| + *out_p = std::move(request);
|
| +
|
| + return true;
|
| +}
|
| +
|
| +} // namespace mojo
|
|
|