Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Do not overwrite first draw callback on proxified layers. (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Sep 26, 2019
1 parent 5a17c77 commit b1ccb24
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void setSurfaceTexture(SurfaceTexture aTexture, final int aWidth, final i
Log.d(LOGTAG, "Texture already set");
return;
}
mFirstDrawCallback = aFirstDrawCallback;

if (mRenderer != null && mRenderer.isLayer()) {
// Widget is using a layer write-only surface but we also want a proxy.
if (mProxyRenderer != null) {
Expand All @@ -116,6 +116,8 @@ public void setSurfaceTexture(SurfaceTexture aTexture, final int aWidth, final i
mProxyRenderer = new UISurfaceTextureRenderer(aTexture, aWidth, aHeight);
postInvalidate();
return;
} else {
mFirstDrawCallback = aFirstDrawCallback;
}
mTexture = aTexture;
if (mRenderer != null) {
Expand Down

0 comments on commit b1ccb24

Please sign in to comment.