Loading services/surfaceflinger/DisplayDevice.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -259,6 +259,13 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, if (sur != hw->mSurface) { result = eglMakeCurrent(dpy, hw->mSurface, hw->mSurface, ctx); if (result == EGL_TRUE) { setViewportAndProjection(hw); } } return result; } void DisplayDevice::setViewportAndProjection(const sp<const DisplayDevice>& hw) { GLsizei w = hw->mDisplayWidth; GLsizei h = hw->mDisplayHeight; glViewport(0, 0, w, h); Loading @@ -267,9 +274,6 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, // put the origin in the left-bottom corner glOrthof(0, w, 0, h, 0, 1); // l=0, r=w ; b=0, t=h } } return result; } // ---------------------------------------------------------------------------- Loading services/surfaceflinger/DisplayDevice.h +2 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,8 @@ public: static EGLBoolean makeCurrent(EGLDisplay dpy, const sp<const DisplayDevice>& hw, EGLContext ctx); static void setViewportAndProjection(const sp<const DisplayDevice>& hw); /* ------------------------------------------------------------------------ * blank / unblank management */ Loading services/surfaceflinger/SurfaceFlinger.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -2510,6 +2510,8 @@ status_t SurfaceFlinger::renderScreenToTextureLocked(uint32_t layerStack, glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, tname, 0); DisplayDevice::setViewportAndProjection(hw); // redraw the screen entirely... glDisable(GL_TEXTURE_EXTERNAL_OES); glDisable(GL_TEXTURE_2D); Loading Loading
services/surfaceflinger/DisplayDevice.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -259,6 +259,13 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, if (sur != hw->mSurface) { result = eglMakeCurrent(dpy, hw->mSurface, hw->mSurface, ctx); if (result == EGL_TRUE) { setViewportAndProjection(hw); } } return result; } void DisplayDevice::setViewportAndProjection(const sp<const DisplayDevice>& hw) { GLsizei w = hw->mDisplayWidth; GLsizei h = hw->mDisplayHeight; glViewport(0, 0, w, h); Loading @@ -267,9 +274,6 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, // put the origin in the left-bottom corner glOrthof(0, w, 0, h, 0, 1); // l=0, r=w ; b=0, t=h } } return result; } // ---------------------------------------------------------------------------- Loading
services/surfaceflinger/DisplayDevice.h +2 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,8 @@ public: static EGLBoolean makeCurrent(EGLDisplay dpy, const sp<const DisplayDevice>& hw, EGLContext ctx); static void setViewportAndProjection(const sp<const DisplayDevice>& hw); /* ------------------------------------------------------------------------ * blank / unblank management */ Loading
services/surfaceflinger/SurfaceFlinger.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -2510,6 +2510,8 @@ status_t SurfaceFlinger::renderScreenToTextureLocked(uint32_t layerStack, glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, tname, 0); DisplayDevice::setViewportAndProjection(hw); // redraw the screen entirely... glDisable(GL_TEXTURE_EXTERNAL_OES); glDisable(GL_TEXTURE_2D); Loading