diff options
| author | 2014-02-21 12:37:59 -0800 | |
|---|---|---|
| committer | 2014-02-21 16:10:54 -0800 | |
| commit | 4ee5696dfbcea1078b24e7c089de74e7cf4e55ca (patch) | |
| tree | ccb5a9ca9ea9a8716a1d53cd4bbd06a0d4083ee4 /services/surfaceflinger/DisplayDevice.cpp | |
| parent | 9076fa78d2541fa14253aaf08e6445fafa17e35b (diff) | |
Virtual Display async mode is overridden
Virtual Display async setting is overridden by eglApi.c causing
stall during composition.
Set the async mode after eglCreateWindowSurface()
b/13139121
Change-Id: I336ca145552e387217cd8bea6e4b7f5f490a274d
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
| -rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index 0d0f98d899..1319debf0a 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -77,16 +77,6 @@ DisplayDevice::DisplayDevice( mNativeWindow = new Surface(producer, false); ANativeWindow* const window = mNativeWindow.get(); - // 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 */ @@ -101,6 +91,16 @@ DisplayDevice::DisplayDevice( eglQuerySurface(display, surface, EGL_WIDTH, &mDisplayWidth); eglQuerySurface(display, surface, EGL_HEIGHT, &mDisplayHeight); + // 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); + mDisplay = display; mSurface = surface; mFormat = format; |