diff options
author | 2009-04-16 20:04:08 -0700 | |
---|---|---|
committer | 2009-04-16 20:04:08 -0700 | |
commit | 17f638b39f2e8b610ecfa1290e5bc42ab7700c98 (patch) | |
tree | 536b2865736b9498d70304db00a64897c472f65f /libs/surfaceflinger/BootAnimation.cpp | |
parent | 6d2c0bc7bfe10a9b70ca608baf626c47a228fa6b (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 4aa8c2c346a9..519b112285ee 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; } |