Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f28ccf0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update HWUI to use AHardwareBufferUtils rather than GrAHardwareBufferUtils" into main

parents e58ec484 30c7800f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include "AutoBackendTextureRelease.h"

#include <SkImage.h>
#include <include/android/AHardwareBufferUtils.h>
#include <include/gpu/MutableTextureState.h>
#include <include/gpu/ganesh/GrBackendSurface.h>
#include <include/gpu/ganesh/GrDirectContext.h>
@@ -120,7 +121,7 @@ void AutoBackendTextureRelease::makeImage(AHardwareBuffer* buffer,
                                          GrDirectContext* context) {
    AHardwareBuffer_Desc desc;
    AHardwareBuffer_describe(buffer, &desc);
    SkColorType colorType = GrAHardwareBufferUtils::GetSkColorTypeFromBufferFormat(desc.format);
    SkColorType colorType = AHardwareBufferUtils::GetSkColorTypeFromBufferFormat(desc.format);
    // The following ref will be counteracted by Skia calling releaseProc, either during
    // BorrowTextureFrom if there is a failure, or later when SkImage is discarded. It must
    // be called before BorrowTextureFrom, otherwise Skia may remove HWUI's ref on failure.