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

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

Merge "Correct viewport initialization, bounds comparison"

parents a4fcdad1 92419751
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -662,7 +662,9 @@ void OpenGLRenderer::calculateLayerBoundsAndClip(Rect& bounds, Rect& clip, bool
        // When the layer is not an FBO, we may use glCopyTexImage so we
        // need to make sure the layer does not extend outside the bounds
        // of the framebuffer
        if (!bounds.intersect(Rect(0, 0, getViewportWidth(), getViewportHeight()))) {
        const Snapshot& previous = *(currentSnapshot()->previous);
        Rect previousViewport(0, 0, previous.getViewportWidth(), previous.getViewportHeight());
        if (!bounds.intersect(previousViewport)) {
            bounds.setEmpty();
        } else if (fboLayer) {
            clip.set(bounds);
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ public:

private:
    struct ViewportData {
        ViewportData() : mWidth(0), mHeight() {}
        ViewportData() : mWidth(0), mHeight(0) {}
        void initialize(int width, int height) {
            mWidth = width;
            mHeight = height;