| 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
5 #include "impeller/toolkit/android/surface_transaction_stats.h"
6
7 #include "impeller/toolkit/android/proc_table.h"
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
impeller::android::SurfaceControl
A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asur...
Definition: surface_control.h:22
surface_transaction_stats.h
impeller::android::CreatePreviousReleaseFence
fml::UniqueFD CreatePreviousReleaseFence(const SurfaceControl &control, ASurfaceTransactionStats *stats)
Definition: surface_transaction_stats.cc:11
impeller::android
Definition: choreographer.cc:9
proc_table.h
impeller::android::SurfaceControl::GetHandle
ASurfaceControl * GetHandle() const
Definition: surface_control.cc:36
impeller::android::GetProcTable
const ProcTable & GetProcTable()
Definition: proc_table.cc:12