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

Commit d721b455 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "Fix ANR & Crash on Ryu" into oc-dev am: 6890dc95

am: 7e206e5d

Change-Id: I5da5af01d7ba897f964e6e5356f12ac01681ca43
parents c1e1d156 7e206e5d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -865,7 +865,8 @@ static jobject android_view_ThreadedRenderer_createHardwareBitmapFromRenderNode(
    sp<IGraphicBufferProducer> producer;
    sp<IGraphicBufferConsumer> rawConsumer;
    BufferQueue::createBufferQueue(&producer, &rawConsumer);
    rawConsumer->setMaxBufferCount(1);
    // We only need 1 buffer but some drivers have bugs so workaround it by setting max count to 2
    rawConsumer->setMaxBufferCount(2);
    sp<BufferItemConsumer> consumer = new BufferItemConsumer(rawConsumer,
            GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_NEVER);
    consumer->setDefaultBufferSize(width, height);
+2 −2
Original line number Diff line number Diff line
@@ -437,8 +437,8 @@ void CanvasContext::draw() {
        if (mNativeSurface.get()) {
            int durationUs;
            nsecs_t dequeueStart = mNativeSurface->getLastDequeueStartTime();
            if (dequeueStart < mCurrentFrameInfo->get(FrameInfoIndex::Vsync)) {
                // Ignoring dequeue duration as it happened prior to vsync
            if (dequeueStart < mCurrentFrameInfo->get(FrameInfoIndex::SyncStart)) {
                // Ignoring dequeue duration as it happened prior to frame render start
                // and thus is not part of the frame.
                swap.dequeueDuration = 0;
            } else {