diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-02 12:21:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-02-12 08:13:00 +0000 |
commit | 606d85f2a5386472314d39923da28c70c60dc8e7 (patch) | |
tree | a8f4d7bf997f349f45605e6058259fba0630e4d7 /chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java | |
parent | 5786336dda477d04fb98483dca1a5426eebde2d7 (diff) | |
download | qtwebengine-chromium-606d85f2a5386472314d39923da28c70c60dc8e7.tar.gz |
BASELINE: Update Chromium to 96.0.4664.181
Change-Id: I762cd1da89d73aa6313b4a753fe126c34833f046
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java')
-rw-r--r-- | chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java b/chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java index c963f6de834..ed95cc3a693 100644 --- a/chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java +++ b/chromium/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java @@ -64,6 +64,9 @@ public class ContentViewRenderView // The native side of this object. private long mNativeContentViewRenderView; + private Surface mLastSurface; + private boolean mLastCanBeUsedWithSurfaceControl; + private int mMinimumSurfaceWidth; private int mMinimumSurfaceHeight; @@ -164,6 +167,13 @@ public class ContentViewRenderView int height, boolean transparentBackground) { assert mNativeContentViewRenderView != 0; assert mSurfaceData == ContentViewRenderView.this.mCurrent; + if (mLastSurface == surface + && mLastCanBeUsedWithSurfaceControl == canBeUsedWithSurfaceControl) { + surface = null; + } else { + mLastSurface = surface; + mLastCanBeUsedWithSurfaceControl = canBeUsedWithSurfaceControl; + } ContentViewRenderViewJni.get().surfaceChanged(mNativeContentViewRenderView, canBeUsedWithSurfaceControl, width, height, transparentBackground, surface); mCompositorHasSurface = surface != null; @@ -178,6 +188,8 @@ public class ContentViewRenderView ContentViewRenderViewJni.get().surfaceDestroyed( mNativeContentViewRenderView, cacheBackBuffer); mCompositorHasSurface = false; + mLastSurface = null; + mLastCanBeUsedWithSurfaceControl = false; } @Override @@ -1023,7 +1035,7 @@ public class ContentViewRenderView void surfaceCreated(long nativeContentViewRenderView); void surfaceDestroyed(long nativeContentViewRenderView, boolean cacheBackBuffer); void surfaceChanged(long nativeContentViewRenderView, boolean canBeUsedWithSurfaceControl, - int width, int height, boolean transparentBackground, Surface surface); + int width, int height, boolean transparentBackground, Surface newSurface); void setNeedsRedraw(long nativeContentViewRenderView); void evictCachedSurface(long nativeContentViewRenderView); ResourceManager getResourceManager(long nativeContentViewRenderView); |