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

Commit dac2b8cb authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/24666066',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/24666066', 'googleplex-android-review.googlesource.com/24240403'] into udc-release.

Change-Id: I72e95c24845597f104934cdd6ef660f1580540fc
parents bfcf7507 ee1e75e1
Loading
Loading
Loading
Loading
+5 −8
Original line number Original line Diff line number Diff line
@@ -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
    // 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
    // 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
    // simply match the existing behavior for protected buffers.)  We also never cache any
    // buffers while in a protected context, since Vk cannot share across contexts, and protected
    // buffers while in a protected context.
    // is less common.
    const bool isProtectedBuffer = buffer->getUsage() & GRALLOC_USAGE_PROTECTED;
    const bool isProtectedBuffer = buffer->getUsage() & GRALLOC_USAGE_PROTECTED;
    if (isProtectedBuffer ||
    if (isProtectedBuffer || isProtected()) {
        (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && isProtected())) {
        return;
        return;
    }
    }
    ATRACE_CALL();
    ATRACE_CALL();
@@ -467,9 +465,8 @@ void SkiaRenderEngine::unmapExternalTextureBuffer(sp<GraphicBuffer>&& buffer) {


std::shared_ptr<AutoBackendTexture::LocalRef> SkiaRenderEngine::getOrCreateBackendTexture(
std::shared_ptr<AutoBackendTexture::LocalRef> SkiaRenderEngine::getOrCreateBackendTexture(
        const sp<GraphicBuffer>& buffer, bool isOutputBuffer) {
        const sp<GraphicBuffer>& buffer, bool isOutputBuffer) {
    // Do not lookup the buffer in the cache for protected contexts with the SkiaVk back-end
    // Do not lookup the buffer in the cache for protected contexts
    if (mRenderEngineType == RenderEngineType::SKIA_GL_THREADED ||
    if (!isProtected()) {
        (mRenderEngineType == RenderEngineType::SKIA_VK_THREADED && !isProtected())) {
        if (const auto& it = mTextureCache.find(buffer->getId()); it != mTextureCache.end()) {
        if (const auto& it = mTextureCache.find(buffer->getId()); it != mTextureCache.end()) {
            return it->second;
            return it->second;
        }
        }
+1 −6
Original line number Original line Diff line number Diff line
@@ -1055,12 +1055,7 @@ bool SensorService::threadLoop() {
        if (count < 0) {
        if (count < 0) {
            if(count == DEAD_OBJECT && device.isReconnecting()) {
            if(count == DEAD_OBJECT && device.isReconnecting()) {
                device.reconnect();
                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 {
            } else {
                ALOGE("sensor poll failed (%s)", strerror(-count));
                ALOGE("sensor poll failed (%s)", strerror(-count));
                break;
                break;