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

Commit 82702922 authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

Explicitly construct all Rects

Don't rely on the default constructor.

Bug 18173359

Change-Id: I182c54a49f5eba896ddcb15cec124ecd14f347f9
parent 344e838d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static jboolean android_view_GraphicBuffer_lockCanvas(JNIEnv* env, jobject,

    sp<GraphicBuffer> buffer(wrapper->buffer);

    Rect rect;
    Rect rect(Rect::EMPTY_RECT);
    if (dirtyRect) {
        rect.left = GET_INT(dirtyRect, gRectClassInfo.left);
        rect.top = GET_INT(dirtyRect, gRectClassInfo.top);
+1 −1
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ static jlong nativeLockCanvas(JNIEnv* env, jclass clazz,
        return 0;
    }

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

    if (dirtyRectObj) {
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ static jboolean android_view_TextureView_lockCanvas(JNIEnv* env, jobject,

    ANativeWindow_Buffer buffer;

    Rect rect;
    Rect rect(Rect::EMPTY_RECT);
    if (dirtyRect) {
        rect.left = GET_INT(dirtyRect, gRectClassInfo.left);
        rect.top = GET_INT(dirtyRect, gRectClassInfo.top);