From 17f638b39f2e8b610ecfa1290e5bc42ab7700c98 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 16 Apr 2009 20:04:08 -0700 Subject: 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). --- libs/surfaceflinger/BootAnimation.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libs/surfaceflinger/BootAnimation.cpp') 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 s = session()->createSurface(getpid(), 0, dinfo.w, dinfo.h, - PIXEL_FORMAT_RGB_565); + sp control = session()->createSurface( + getpid(), 0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_565); session()->openTransaction(); - s->setLayer(0x40000000); + control->setLayer(0x40000000); session()->closeTransaction(); + sp 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; } -- cgit v1.2.3-59-g8ed1b