From a320e92c56a17a4c70e58e56b2df3d966510196c Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Wed, 30 Oct 2019 13:17:41 +0000 Subject: Revert "Remove native calls to HWUI from Surface and use the public API instead" This reverts commit 79201b16f1dbfcfd23c1bbde08fd86b078a593bf. Reason for revert: breaks wm-presubmit Change-Id: I3245e202f88b16d30b924e229cbc05fca37a3759 --- graphics/java/android/graphics/HardwareRenderer.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/HardwareRenderer.java b/graphics/java/android/graphics/HardwareRenderer.java index 3f3ad578e8d7..b6b2d4e1c46a 100644 --- a/graphics/java/android/graphics/HardwareRenderer.java +++ b/graphics/java/android/graphics/HardwareRenderer.java @@ -286,24 +286,10 @@ public class HardwareRenderer { * non-null then {@link Surface#isValid()} must be true. */ public void setSurface(@Nullable Surface surface) { - setSurface(surface, false); - } - - /** - * See {@link #setSurface(Surface)} - * - * @hide - * @param discardBuffer determines whether the surface will attempt to preserve its contents - * between frames. If set to true the renderer will attempt to preserve - * the contents of the buffer between frames if the implementation allows - * it. If set to false no attempt will be made to preserve the buffer's - * contents between frames. - */ - public void setSurface(@Nullable Surface surface, boolean discardBuffer) { if (surface != null && !surface.isValid()) { throw new IllegalArgumentException("Surface is invalid. surface.isValid() == false."); } - nSetSurface(mNativeProxy, surface, discardBuffer); + nSetSurface(mNativeProxy, surface); } /** @@ -1098,7 +1084,7 @@ public class HardwareRenderer { private static native void nSetName(long nativeProxy, String name); - private static native void nSetSurface(long nativeProxy, Surface window, boolean discardBuffer); + private static native void nSetSurface(long nativeProxy, Surface window); private static native boolean nPause(long nativeProxy); -- cgit v1.2.3-59-g8ed1b