am 289b9b62: Add ANativeWindow API for directly drawing to the surface bits.

Merge commit '289b9b62372ef52a06113b83dfb870e2c2fb325a' into gingerbread-plus-aosp

* commit '289b9b62372ef52a06113b83dfb870e2c2fb325a':
  Add ANativeWindow API for directly drawing to the surface bits.
This commit is contained in:
Dianne Hackborn
2010-07-09 17:03:14 -07:00
committed by Android Git Automerger
19 changed files with 456 additions and 96 deletions

View File

@@ -452,6 +452,7 @@ public final class ViewRoot extends Handler implements ViewParent,
((RootViewSurfaceTaker)view).willYouTakeTheSurface();
if (mSurfaceHolderCallback != null) {
mSurfaceHolder = new TakenSurfaceHolder();
mSurfaceHolder.setFormat(PixelFormat.UNKNOWN);
}
}
Resources resources = mView.getContext().getResources();
@@ -754,7 +755,7 @@ public final class ViewRoot extends Handler implements ViewParent,
// object is not initialized to its backing store, but soon it
// will be (assuming the window is visible).
attachInfo.mSurface = mSurface;
attachInfo.mTranslucentWindow = lp.format != PixelFormat.OPAQUE;
attachInfo.mTranslucentWindow = PixelFormat.formatHasAlpha(lp.format);
attachInfo.mHasWindowFocus = false;
attachInfo.mWindowVisibility = viewVisibility;
attachInfo.mRecomputeGlobalAttributes = false;
@@ -926,8 +927,6 @@ public final class ViewRoot extends Handler implements ViewParent,
if (mSurfaceHolder != null) {
mSurfaceHolder.mSurfaceLock.lock();
mDrawingAllowed = true;
lp.format = mSurfaceHolder.getRequestedFormat();
lp.type = mSurfaceHolder.getRequestedType();
}
boolean initialized = false;