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

Commit 60fca420 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Wait on frame work fences when frames are dropped" into nyc-mr1-dev

parents 57bd22ff 06e2e9cf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -633,6 +633,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
@@ -168,6 +168,8 @@ public:

    ANDROID_API int64_t getFrameNumber();

    void waitOnFences();

private:
    friend class RegisterFrameCallbackTask;
    // TODO: Replace with something better for layer & other GL object
@@ -178,8 +180,6 @@ private:

    void freePrefetchedLayers(TreeObserver* observer);

    void waitOnFences();

    bool isSwapChainStuffed();

    EGLint mLastFrameWidth = 0;
+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) {