Skip to content

Commit

Permalink
Merge pull request rustdesk#5749 from dignow/fix/texture_widget_blurr…
Browse files Browse the repository at this point in the history
…y_image

fix, texture render widget, blurry image
  • Loading branch information
rustdesk authored Sep 19, 2023
2 parents f5b945c + 6014dd0 commit 7e5b81f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions flutter/lib/desktop/pages/remote_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class _RemotePageState extends State<RemotePage>
keyboardEnabled: _keyboardEnabled,
remoteCursorMoved: _remoteCursorMoved,
textureId: _renderTexture.textureId,
useTextureRender: _renderTexture.useTextureRender,
useTextureRender: RenderTexture.useTextureRender,
listenerBuilder: (child) =>
_buildRawTouchAndPointerRegion(child, enterView, leaveView),
);
Expand Down Expand Up @@ -539,7 +539,10 @@ class _ImagePaintState extends State<ImagePaint> {
imageWidget = SizedBox(
width: imageWidth,
height: imageHeight,
child: Obx(() => Texture(textureId: widget.textureId.value)),
child: Obx(() => Texture(
textureId: widget.textureId.value,
filterQuality: FilterQuality.none,
)),
);
} else {
imageWidget = CustomPaint(
Expand Down Expand Up @@ -576,11 +579,14 @@ class _ImagePaintState extends State<ImagePaint> {
imageWidget = Stack(
children: [
Positioned(
left: c.x.toInt().toDouble(),
top: c.y.toInt().toDouble(),
left: c.x,
top: c.y,
width: c.getDisplayWidth() * s,
height: c.getDisplayHeight() * s,
child: Texture(textureId: widget.textureId.value),
child: Texture(
textureId: widget.textureId.value,
filterQuality: FilterQuality.none,
),
)
],
);
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/models/desktop_render_texture.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class RenderTexture {
final RxInt textureId = RxInt(-1);
int _textureKey = -1;
SessionID? _sessionId;
final useTextureRender = bind.mainUseTextureRender();
static final useTextureRender = bind.mainUseTextureRender();

final textureRenderer = TextureRgbaRenderer();

Expand Down

0 comments on commit 7e5b81f

Please sign in to comment.