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

Commit f8d04b2d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check and configure pixel format when locking canvas" into qt-dev

parents c3553372 a041114b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -212,6 +212,10 @@ static jlong nativeLockCanvas(JNIEnv* env, jclass clazz,
        return 0;
    }

    if (convertPixelFormat(ANativeWindow_getFormat(surface.get())) == kUnknown_SkColorType) {
        native_window_set_buffers_format(surface.get(), PIXEL_FORMAT_RGBA_8888);
    }

    Rect dirtyRect(Rect::EMPTY_RECT);
    Rect* dirtyRectPtr = NULL;