Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "cc/ipc/copy_output_request_struct_traits.h" | |
| 6 | |
| 7 namespace mojo { | |
| 8 | |
| 9 // static | |
| 10 bool StructTraits<cc::mojom::CopyOutputRequestDataView, | |
| 11 std::unique_ptr<cc::CopyOutputRequest>>:: | |
| 12 Read(cc::mojom::CopyOutputRequestDataView data, | |
| 13 std::unique_ptr<cc::CopyOutputRequest>* out_p) { | |
| 14 std::unique_ptr<cc::CopyOutputRequest>& out = *out_p; | |
| 15 out = cc::CopyOutputRequest::CreateEmptyRequest(); | |
| 16 out->force_bitmap_result_ = data.force_bitmap_result(); | |
| 17 return data.ReadSource(&out->source_) && data.ReadArea(&out->area_) && | |
|
Tom Sepez
2017/02/04 00:32:14
I suppose it's ok to short-circuit here, the calle
Saman Sami
2017/02/04 01:09:25
Good idea. It'll make the code cleaner too. Here i
| |
| 18 data.ReadTextureMailbox(&out->texture_mailbox_); | |
| 19 } | |
| 20 | |
| 21 } // namespace mojo | |
| OLD | NEW |