Loading services/surfaceflinger/DisplayDevice.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,6 @@ DisplayDevice::DisplayDevice( mDisplaySurface(displaySurface), mDisplaySurface(displaySurface), mDisplay(EGL_NO_DISPLAY), mDisplay(EGL_NO_DISPLAY), mSurface(EGL_NO_SURFACE), mSurface(EGL_NO_SURFACE), mContext(EGL_NO_CONTEXT), mDisplayWidth(), mDisplayHeight(), mFormat(), mDisplayWidth(), mDisplayHeight(), mFormat(), mFlags(), mFlags(), mPageFlipCount(), mPageFlipCount(), Loading @@ -80,6 +79,16 @@ DisplayDevice::DisplayDevice( int format; int format; window->query(window, NATIVE_WINDOW_FORMAT, &format); window->query(window, NATIVE_WINDOW_FORMAT, &format); // Make sure that composition can never be stalled by a virtual display // consumer that isn't processing buffers fast enough. We have to do this // in two places: // * Here, in case the display is composed entirely by HWC. // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the // window's swap interval in eglMakeCurrent, so they'll override the // interval we set here. if (mType >= DisplayDevice::DISPLAY_VIRTUAL) window->setSwapInterval(window, 0); /* /* * Create our display's surface * Create our display's surface */ */ Loading Loading @@ -254,6 +263,8 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const { if (sur != mSurface) { if (sur != mSurface) { result = eglMakeCurrent(dpy, mSurface, mSurface, ctx); result = eglMakeCurrent(dpy, mSurface, mSurface, ctx); if (result == EGL_TRUE) { if (result == EGL_TRUE) { if (mType >= DisplayDevice::DISPLAY_VIRTUAL) eglSwapInterval(dpy, 0); setViewportAndProjection(); setViewportAndProjection(); } } } } Loading services/surfaceflinger/DisplayDevice.h +0 −1 Original line number Original line Diff line number Diff line Loading @@ -171,7 +171,6 @@ private: EGLDisplay mDisplay; EGLDisplay mDisplay; EGLSurface mSurface; EGLSurface mSurface; EGLContext mContext; int mDisplayWidth; int mDisplayWidth; int mDisplayHeight; int mDisplayHeight; PixelFormat mFormat; PixelFormat mFormat; Loading Loading
services/surfaceflinger/DisplayDevice.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,6 @@ DisplayDevice::DisplayDevice( mDisplaySurface(displaySurface), mDisplaySurface(displaySurface), mDisplay(EGL_NO_DISPLAY), mDisplay(EGL_NO_DISPLAY), mSurface(EGL_NO_SURFACE), mSurface(EGL_NO_SURFACE), mContext(EGL_NO_CONTEXT), mDisplayWidth(), mDisplayHeight(), mFormat(), mDisplayWidth(), mDisplayHeight(), mFormat(), mFlags(), mFlags(), mPageFlipCount(), mPageFlipCount(), Loading @@ -80,6 +79,16 @@ DisplayDevice::DisplayDevice( int format; int format; window->query(window, NATIVE_WINDOW_FORMAT, &format); window->query(window, NATIVE_WINDOW_FORMAT, &format); // Make sure that composition can never be stalled by a virtual display // consumer that isn't processing buffers fast enough. We have to do this // in two places: // * Here, in case the display is composed entirely by HWC. // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the // window's swap interval in eglMakeCurrent, so they'll override the // interval we set here. if (mType >= DisplayDevice::DISPLAY_VIRTUAL) window->setSwapInterval(window, 0); /* /* * Create our display's surface * Create our display's surface */ */ Loading Loading @@ -254,6 +263,8 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const { if (sur != mSurface) { if (sur != mSurface) { result = eglMakeCurrent(dpy, mSurface, mSurface, ctx); result = eglMakeCurrent(dpy, mSurface, mSurface, ctx); if (result == EGL_TRUE) { if (result == EGL_TRUE) { if (mType >= DisplayDevice::DISPLAY_VIRTUAL) eglSwapInterval(dpy, 0); setViewportAndProjection(); setViewportAndProjection(); } } } } Loading
services/surfaceflinger/DisplayDevice.h +0 −1 Original line number Original line Diff line number Diff line Loading @@ -171,7 +171,6 @@ private: EGLDisplay mDisplay; EGLDisplay mDisplay; EGLSurface mSurface; EGLSurface mSurface; EGLContext mContext; int mDisplayWidth; int mDisplayWidth; int mDisplayHeight; int mDisplayHeight; PixelFormat mFormat; PixelFormat mFormat; Loading