Flutter Impeller
surface_transaction_stats.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 
6 
8 
9 namespace impeller::android {
10 
11 fml::UniqueFD CreatePreviousReleaseFence(const SurfaceControl& control,
12  ASurfaceTransactionStats* stats) {
13  const auto fd =
14  GetProcTable().ASurfaceTransactionStats_getPreviousReleaseFenceFd(
15  stats, control.GetHandle());
16  if (fd == -1) {
17  // The previous buffer has already been released. This is not an error.
18  return {};
19  }
20  return fml::UniqueFD{fd};
21 }
22 
23 } // namespace impeller::android
A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asur...
ASurfaceControl * GetHandle() const
const ProcTable & GetProcTable()
Definition: proc_table.cc:12
fml::UniqueFD CreatePreviousReleaseFence(const SurfaceControl &control, ASurfaceTransactionStats *stats)