Revert "Make starting window hw-accelerated"
Bug: 17516789
This change corresponds to a sudden influx of bad surface crashes.
Reverting to see if stability returns as this was an optimization
CL
This reverts commit 29ff1bc57ac2c995c56f15ed6e56e5fb247b2a44.
Change-Id: I7835e89017161d94ad05fe46d81bd437c3dae3a7
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 3d1332c..5d2822d 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -16,7 +16,6 @@
package android.view;
-import android.graphics.Color;
import com.android.internal.R;
import android.content.Context;
@@ -268,8 +267,7 @@
view.mRecreateDisplayList = false;
}
- private void updateRootDisplayList(View view, HardwareDrawCallbacks callbacks,
- boolean isStartingWindow) {
+ private void updateRootDisplayList(View view, HardwareDrawCallbacks callbacks) {
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
updateViewTreeDisplayList(view);
@@ -281,12 +279,6 @@
callbacks.onHardwarePreDraw(canvas);
canvas.insertReorderBarrier();
- if (isStartingWindow) {
- // Compensate for some situations in which a hw-accelerated surface
- // will not be filled with anything by default; this is equivalent
- // to the old behavior when the system process was not hw-accelerated
- canvas.drawColor(Color.BLACK);
- }
canvas.drawRenderNode(view.getDisplayList());
canvas.insertInorderBarrier();
@@ -306,8 +298,7 @@
}
@Override
- void draw(View view, AttachInfo attachInfo, HardwareDrawCallbacks callbacks,
- boolean isStartingWindow) {
+ void draw(View view, AttachInfo attachInfo, HardwareDrawCallbacks callbacks) {
attachInfo.mIgnoreDirtyState = true;
long frameTimeNanos = mChoreographer.getFrameTimeNanos();
attachInfo.mDrawingTime = frameTimeNanos / TimeUtils.NANOS_PER_MS;
@@ -317,7 +308,7 @@
recordDuration = System.nanoTime();
}
- updateRootDisplayList(view, callbacks, isStartingWindow);
+ updateRootDisplayList(view, callbacks);
if (mProfilingEnabled) {
recordDuration = System.nanoTime() - recordDuration;