diff options
author | 2009-04-16 20:04:08 -0700 | |
---|---|---|
committer | 2009-04-16 20:04:08 -0700 | |
commit | 01b766839e06c32540cef100e3a7710d12cf1eef (patch) | |
tree | 38528a4f4e1c99b5941f372ec617751ec48dac8c /libs/surfaceflinger/BootAnimation.cpp | |
parent | 62185b7335e85211dc4d0e2003354eb3ea2e66ef (diff) |
more splitting of Surface/SurfaceControl. Surface.java is now implemented in terms of Surface and SurfaceControl.
The WindowManager side of Surface.java holds a SurfaceControl, while the client-side holds a Surface. When the client is in the system process, Surface.java holds both (which is a problem we'll try to fix later).
Diffstat (limited to 'libs/surfaceflinger/BootAnimation.cpp')
-rw-r--r-- | libs/surfaceflinger/BootAnimation.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/surfaceflinger/BootAnimation.cpp b/libs/surfaceflinger/BootAnimation.cpp index 4aa8c2c346..519b112285 100644 --- a/libs/surfaceflinger/BootAnimation.cpp +++ b/libs/surfaceflinger/BootAnimation.cpp @@ -128,12 +128,14 @@ status_t BootAnimation::readyToRun() { return -1; // create the native surface - sp<Surface> s = session()->createSurface(getpid(), 0, dinfo.w, dinfo.h, - PIXEL_FORMAT_RGB_565); + sp<SurfaceControl> control = session()->createSurface( + getpid(), 0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_565); session()->openTransaction(); - s->setLayer(0x40000000); + control->setLayer(0x40000000); session()->closeTransaction(); + sp<Surface> s = control->getSurface(); + // initialize opengl and egl const EGLint attribs[] = { EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 0, EGL_NONE }; @@ -156,6 +158,7 @@ status_t BootAnimation::readyToRun() { mSurface = surface; mWidth = w; mHeight = h; + mFlingerSurfaceControl = control; mFlingerSurface = s; // initialize GL @@ -176,7 +179,7 @@ bool BootAnimation::threadLoop() { eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(mDisplay, mContext); eglDestroySurface(mDisplay, mSurface); - mFlingerSurface.clear(); + mFlingerSurfaceControl.clear(); return r; } |