summaryrefslogtreecommitdiff
path: root/libs/hwui/AutoBackendTextureRelease.cpp
diff options
context:
space:
mode:
author Kevin Lubick <kjlubick@google.com> 2023-03-17 19:55:58 +0000
committer Kevin Lubick <kjlubick@google.com> 2023-03-27 15:03:59 +0000
commitdd8b2ea5a60fc0106e530d0e047a44de89b0cb4a (patch)
treec30a55a82b239184546ee78467695792dc3f6c72 /libs/hwui/AutoBackendTextureRelease.cpp
parentf8827b1ad06818d3c984388a6e2a56e0a0549cf4 (diff)
Migrate SkImage static methods to SkImages namespace
Will need to land after https://skia-review.googlesource.com/c/skia/+/648297 lands and rolls Change-Id: Ie2ecb8f74dd52fcdd35e7cf9c311e8ed94781a07 Bug: skbug.com/13983
Diffstat (limited to 'libs/hwui/AutoBackendTextureRelease.cpp')
-rw-r--r--libs/hwui/AutoBackendTextureRelease.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/AutoBackendTextureRelease.cpp b/libs/hwui/AutoBackendTextureRelease.cpp
index b656b6ac8204..ab85995d26c1 100644
--- a/libs/hwui/AutoBackendTextureRelease.cpp
+++ b/libs/hwui/AutoBackendTextureRelease.cpp
@@ -16,6 +16,8 @@
#include "AutoBackendTextureRelease.h"
+#include <SkImage.h>
+#include <include/gpu/ganesh/SkImageGanesh.h>
#include "renderthread/RenderThread.h"
#include "utils/Color.h"
#include "utils/PaintUtils.h"
@@ -83,10 +85,10 @@ void AutoBackendTextureRelease::makeImage(AHardwareBuffer* buffer,
AHardwareBuffer_describe(buffer, &desc);
SkColorType colorType = GrAHardwareBufferUtils::GetSkColorTypeFromBufferFormat(desc.format);
// The following ref will be counteracted by Skia calling releaseProc, either during
- // MakeFromTexture if there is a failure, or later when SkImage is discarded. It must
- // be called before MakeFromTexture, otherwise Skia may remove HWUI's ref on failure.
+ // 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.
ref();
- mImage = SkImage::MakeFromTexture(
+ mImage = SkImages::BorrowTextureFrom(
context, mBackendTexture, kTopLeft_GrSurfaceOrigin, colorType, kPremul_SkAlphaType,
uirenderer::DataSpaceToColorSpace(dataspace), releaseProc, this);
}