Ensure canvas background is black before drawing
(cherry picked from commit 618afd7028
)
This commit is contained in:
parent
2612b32a72
commit
c32cc8812e
@ -13,23 +13,21 @@ package com.freerdp.freerdpcore.presentation;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.ScaleGestureDetector;
|
||||
import android.view.View;
|
||||
|
||||
import com.freerdp.freerdpcore.application.SessionState;
|
||||
import com.freerdp.freerdpcore.services.LibFreeRDP;
|
||||
import com.freerdp.freerdpcore.utils.DoubleGestureDetector;
|
||||
import com.freerdp.freerdpcore.utils.GestureDetector;
|
||||
import com.freerdp.freerdpcore.utils.Mouse;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
@ -214,6 +212,7 @@ public class SessionView extends View
|
||||
|
||||
canvas.save();
|
||||
canvas.concat(scaleMatrix);
|
||||
canvas.drawColor(Color.BLACK);
|
||||
surface.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ static BOOL android_post_connect(freerdp* instance)
|
||||
update = instance->update;
|
||||
settings = instance->settings;
|
||||
|
||||
if (!gdi_init(instance, PIXEL_FORMAT_RGBA32))
|
||||
if (!gdi_init(instance, PIXEL_FORMAT_RGBX32))
|
||||
return FALSE;
|
||||
|
||||
if (!android_register_pointer(instance->context->graphics))
|
||||
@ -894,7 +894,7 @@ static jboolean JNICALL jni_freerdp_update_graphics(JNIEnv* env, jclass cls, jlo
|
||||
switch (info.format)
|
||||
{
|
||||
case ANDROID_BITMAP_FORMAT_RGBA_8888:
|
||||
DstFormat = PIXEL_FORMAT_RGBA32;
|
||||
DstFormat = PIXEL_FORMAT_RGBX32;
|
||||
break;
|
||||
|
||||
case ANDROID_BITMAP_FORMAT_RGB_565:
|
||||
|
Loading…
Reference in New Issue
Block a user