summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-09-15 22:43:05 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-09-15 22:43:05 +0000
commit5da5f0939143d63b342c2ab255139d4e51c5637a (patch)
tree1c8dcc4c252772b9ee5354b23b3b57b420eaa0a0
parentccb50dcce03cc9f0029df4cdca9f16f77dd797fb (diff)
parentdac2b8cba53eee8eaafeef667130d82d9e9471fc (diff)
downloadnative-5da5f0939143d63b342c2ab255139d4e51c5637a.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/24666066', 'googleplex-android-review.googlesource.com/24240403'] into udc-release. am: dac2b8cba5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24776189 Change-Id: I62ce3274111278735f816d1145d74788127286cf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/renderengine/skia/SkiaRenderEngine.cpp13
-rw-r--r--services/sensorservice/SensorService.cpp7
2 files changed, 6 insertions, 14 deletions
diff --git a/libs/renderengine/skia/SkiaRenderEngine.cpp b/libs/renderengine/skia/SkiaRenderEngine.cpp
index 76ebf9d0c2..2a977630a3 100644
--- a/libs/renderengine/skia/SkiaRenderEngine.cpp
+++ b/libs/renderengine/skia/SkiaRenderEngine.cpp
@@ -397,12 +397,10 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer,
}
// We don't attempt to map a buffer if the buffer contains protected content. In GL this is
// important because GPU resources for protected buffers are much more limited. (In Vk we
- // simply match the existing behavior for protected buffers.) In Vk, we never cache any
- // buffers while in a protected context, since Vk cannot share across contexts, and protected
- // is less common.
+ // simply match the existing behavior for protected buffers.) We also never cache any
+ // buffers while in a protected context.
const bool isProtectedBuffer = buffer->getUsage() & GRALLOC_USAGE_PROTECTED;
- if (isProtectedBuffer ||
- (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && isProtected())) {
+ if (isProtectedBuffer || isProtected()) {
return;
}
ATRACE_CALL();
@@ -467,9 +465,8 @@ void SkiaRenderEngine::unmapExternalTextureBuffer(sp<GraphicBuffer>&& buffer) {
std::shared_ptr<AutoBackendTexture::LocalRef> SkiaRenderEngine::getOrCreateBackendTexture(
const sp<GraphicBuffer>& buffer, bool isOutputBuffer) {
- // Do not lookup the buffer in the cache for protected contexts with the SkiaVk back-end
- if (mRenderEngineType == RenderEngineType::SKIA_GL_THREADED ||
- (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && !isProtected())) {
+ // Do not lookup the buffer in the cache for protected contexts
+ if (!isProtected()) {
if (const auto& it = mTextureCache.find(buffer->getId()); it != mTextureCache.end()) {
return it->second;
}
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index 90d75414d6..398d60242b 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -1055,12 +1055,7 @@ bool SensorService::threadLoop() {
if (count < 0) {
if(count == DEAD_OBJECT && device.isReconnecting()) {
device.reconnect();
- // There are no "real" events at this point, but do not skip the rest of the loop
- // if there are pending runtime events.
- Mutex::Autolock _l(&mLock);
- if (mRuntimeSensorEventQueue.empty()) {
- continue;
- }
+ continue;
} else {
ALOGE("sensor poll failed (%s)", strerror(-count));
break;