am c58ab5f6: Merge "Allow all loopers to be RT-accelerated"

* commit 'c58ab5f60e5fcc845ceb1e146372a1dbf99cbb82':
  Allow all loopers to be RT-accelerated
This commit is contained in:
John Reck
2014-05-07 23:45:12 +00:00
committed by Android Git Automerger
3 changed files with 114 additions and 6 deletions

View File

@@ -710,12 +710,15 @@ public final class ViewRootImpl implements ViewParent,
if (!HardwareRenderer.sRendererDisabled || (HardwareRenderer.sSystemRendererDisabled
&& forceHwAccelerated)) {
// Don't enable hardware acceleration when we're not on the main thread
if (!HardwareRenderer.sSystemRendererDisabled &&
Looper.getMainLooper() != Looper.myLooper()) {
Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware "
+ "acceleration outside of the main thread, aborting");
return;
if (!HardwareRenderer.sUseRenderThread) {
// TODO: Delete
// Don't enable hardware acceleration when we're not on the main thread
if (!HardwareRenderer.sSystemRendererDisabled &&
Looper.getMainLooper() != Looper.myLooper()) {
Log.w(HardwareRenderer.LOG_TAG, "Attempting to initialize hardware "
+ "acceleration outside of the main thread, aborting");
return;
}
}
if (mAttachInfo.mHardwareRenderer != null) {