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

Commit b1ccb24

Browse files
MortimerGorobluemarvin
authored andcommitted
Do not overwrite first draw callback on proxified layers. (#1885)
1 parent 5a17c77 commit b1ccb24

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • app/src/common/shared/org/mozilla/vrbrowser/ui/widgets

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/UIWidget.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void setSurfaceTexture(SurfaceTexture aTexture, final int aWidth, final i
107107
Log.d(LOGTAG, "Texture already set");
108108
return;
109109
}
110-
mFirstDrawCallback = aFirstDrawCallback;
110+
111111
if (mRenderer != null && mRenderer.isLayer()) {
112112
// Widget is using a layer write-only surface but we also want a proxy.
113113
if (mProxyRenderer != null) {
@@ -116,6 +116,8 @@ public void setSurfaceTexture(SurfaceTexture aTexture, final int aWidth, final i
116116
mProxyRenderer = new UISurfaceTextureRenderer(aTexture, aWidth, aHeight);
117117
postInvalidate();
118118
return;
119+
} else {
120+
mFirstDrawCallback = aFirstDrawCallback;
119121
}
120122
mTexture = aTexture;
121123
if (mRenderer != null) {

0 commit comments

Comments
 (0)