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

Commit 7cae510f authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Wait on frame work fences when frames are dropped am: 06e2e9cf am: 7a14f5ae

am: b53c6087

Change-Id: Ib9c5be43f65379770b17260c34be90fccb360277
parents 9d6f0037 b53c6087
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -433,6 +433,9 @@ void CanvasContext::prepareAndDraw(RenderNode* node) {
    prepareTree(info, frameInfo, systemTime(CLOCK_MONOTONIC), node);
    if (info.out.canDrawThisFrame) {
        draw();
    } else {
        // wait on fences so tasks don't overlap next frame
        waitOnFences();
    }
}

+2 −2
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ public:

    ANDROID_API int64_t getFrameNumber();

    void waitOnFences();

private:
    CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode,
            IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline);
@@ -171,8 +173,6 @@ private:

    void freePrefetchedLayers(TreeObserver* observer);

    void waitOnFences();

    bool isSwapChainStuffed();

    SkRect computeDirtyRect(const Frame& frame, SkRect* dirty);
+3 −0
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ void DrawFrameTask::run() {

    if (CC_LIKELY(canDrawThisFrame)) {
        context->draw();
    } else {
        // wait on fences so tasks don't overlap next frame
        context->waitOnFences();
    }

    if (!canUnblockUiThread) {