Skip to content

Commit

Permalink
Don't rely on default argument of NDK API.
Browse files Browse the repository at this point in the history
The NDK APIs are supposed to be C-compatible. This one accidentally
included a default argument, which is a C++ feature. That's being
fixed, so this needs to pass the argument explicitly.

Bug: android/ndk#1920
Test: treehugger
Change-Id: Ia79da4b4593dfd46302cb44298e906bb8e6c4d86
  • Loading branch information
DanAlbert committed Feb 23, 2024
1 parent ce4649a commit 7a14122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/graphics/HwAccelerationTest/jni/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct MyWrapper {

void setBuffer(AHardwareBuffer* buffer) {
ASurfaceTransaction* transaction = ASurfaceTransaction_create();
ASurfaceTransaction_setBuffer(transaction, surfaceControl, buffer);
ASurfaceTransaction_setBuffer(transaction, surfaceControl, buffer, -1);
ASurfaceTransaction_setVisibility(transaction, surfaceControl,
ASURFACE_TRANSACTION_VISIBILITY_SHOW);
ASurfaceTransaction_apply(transaction);
Expand Down

0 comments on commit 7a14122

Please sign in to comment.