summaryrefslogtreecommitdiff
path: root/libs/hwui/HardwareBitmapUploader.cpp
diff options
context:
space:
mode:
author Kevin Lubick <kjlubick@google.com> 2023-09-12 18:33:10 +0000
committer Kevin Lubick <kjlubick@google.com> 2023-09-12 18:33:45 +0000
commitcae0b21c5816b4e3991b27f59d6faaf180db50e1 (patch)
tree7eda31e16545ed12c062ab937b06e998ce5d146e /libs/hwui/HardwareBitmapUploader.cpp
parent9f1c93593c79eeb86f94206c5e83bb4f7b9d77ca (diff)
[base] Update GrDirectContext calls to use safer API
In http://review.skia.org/750403 and http://review.skia.org/751523, Skia modified some GrDirectContext APIs to make them less error-prone in response to https://crbug.com/1475906. This updates part of Android to call those modified APIs. Change-Id: I164fcc735b3c36bf58de2f1ed9f277e90fc09325
Diffstat (limited to 'libs/hwui/HardwareBitmapUploader.cpp')
-rw-r--r--libs/hwui/HardwareBitmapUploader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp
index 19a1dfa91539..16de21def0e3 100644
--- a/libs/hwui/HardwareBitmapUploader.cpp
+++ b/libs/hwui/HardwareBitmapUploader.cpp
@@ -22,6 +22,7 @@
#include <GLES2/gl2ext.h>
#include <GLES3/gl3.h>
#include <GrDirectContext.h>
+#include <GrTypes.h>
#include <SkBitmap.h>
#include <SkCanvas.h>
#include <SkImage.h>
@@ -265,7 +266,7 @@ private:
sk_sp<SkImage> image =
SkImages::TextureFromAHardwareBufferWithData(mGrContext.get(), bitmap.pixmap(),
ahb);
- mGrContext->submit(true);
+ mGrContext->submit(GrSyncCpu::kYes);
uploadSucceeded = (image.get() != nullptr);
});