Loading libs/surfaceflinger/LayerBuffer.cpp +1 −3 Original line number Original line Diff line number Diff line Loading @@ -437,9 +437,7 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } } if (err != NO_ERROR) { if (err != NO_ERROR) { // OpenGL fall-back // slower fallback GLuint w = 0; GLuint h = 0; GGLSurface t; GGLSurface t; t.version = sizeof(GGLSurface); t.version = sizeof(GGLSurface); t.width = src.crop.r; t.width = src.crop.r; Loading opengl/libagl/copybit.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -74,6 +74,7 @@ private: static int iterate_done(copybit_region_t const *, copybit_rect_t*) { static int iterate_done(copybit_region_t const *, copybit_rect_t*) { return 0; return 0; } } public: copybit_rect_t r; copybit_rect_t r; }; }; Loading Loading @@ -421,6 +422,19 @@ static bool copybit(GLint x, GLint y, (enables & GGL_ENABLE_DITHER) ? (enables & GGL_ENABLE_DITHER) ? COPYBIT_ENABLE : COPYBIT_DISABLE); COPYBIT_ENABLE : COPYBIT_DISABLE); clipRectRegion it(c); clipRectRegion it(c); LOGD("dst={%d, %d, %d, %p, %p}, " "src={%d, %d, %d, %p, %p}, " "drect={%d,%d,%d,%d}, " "srect={%d,%d,%d,%d}, " "it={%d,%d,%d,%d}, " , dst.w, dst.h, dst.format, dst.base, dst.handle, src.w, src.h, src.format, src.base, src.handle, drect.l, drect.t, drect.r, drect.b, srect.l, srect.t, srect.r, srect.b, it.r.l, it.r.t, it.r.r, it.r.b ); err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); } } if (err != NO_ERROR) { if (err != NO_ERROR) { Loading opengl/libs/EGL/egl.cpp +24 −4 Original line number Original line Diff line number Diff line Loading @@ -1641,8 +1641,13 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, if (dp == 0) { if (dp == 0) { return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR); return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR); } } // since we don't have a way to know which implementation to call, // we're calling all of them /* Since we don't have a way to know which implementation to call, * we're calling all of them. If at least one of the implementation * succeeded, this is a success. */ EGLint currentError = eglGetError(); EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; bool success = false; bool success = false; Loading @@ -1659,8 +1664,23 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, } } } } } } if (!success) if (!success) { // failure, if there was an error when we entered this function, // the error flag must not be updated. // Otherwise, the error is whatever happened in the implementation // that faulted. if (currentError != EGL_SUCCESS) { setError(currentError, EGL_NO_IMAGE_KHR); } return EGL_NO_IMAGE_KHR; return EGL_NO_IMAGE_KHR; } else { // In case of success, we need to clear all error flags // (especially those caused by the implementation that didn't // succeed). TODO: we could about this if we knew this was // a "full" success (all implementation succeeded). eglGetError(); } egl_image_t* result = new egl_image_t(dpy, ctx); egl_image_t* result = new egl_image_t(dpy, ctx); memcpy(result->images, implImages, sizeof(implImages)); memcpy(result->images, implImages, sizeof(implImages)); Loading Loading
libs/surfaceflinger/LayerBuffer.cpp +1 −3 Original line number Original line Diff line number Diff line Loading @@ -437,9 +437,7 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } } if (err != NO_ERROR) { if (err != NO_ERROR) { // OpenGL fall-back // slower fallback GLuint w = 0; GLuint h = 0; GGLSurface t; GGLSurface t; t.version = sizeof(GGLSurface); t.version = sizeof(GGLSurface); t.width = src.crop.r; t.width = src.crop.r; Loading
opengl/libagl/copybit.cpp +14 −0 Original line number Original line Diff line number Diff line Loading @@ -74,6 +74,7 @@ private: static int iterate_done(copybit_region_t const *, copybit_rect_t*) { static int iterate_done(copybit_region_t const *, copybit_rect_t*) { return 0; return 0; } } public: copybit_rect_t r; copybit_rect_t r; }; }; Loading Loading @@ -421,6 +422,19 @@ static bool copybit(GLint x, GLint y, (enables & GGL_ENABLE_DITHER) ? (enables & GGL_ENABLE_DITHER) ? COPYBIT_ENABLE : COPYBIT_DISABLE); COPYBIT_ENABLE : COPYBIT_DISABLE); clipRectRegion it(c); clipRectRegion it(c); LOGD("dst={%d, %d, %d, %p, %p}, " "src={%d, %d, %d, %p, %p}, " "drect={%d,%d,%d,%d}, " "srect={%d,%d,%d,%d}, " "it={%d,%d,%d,%d}, " , dst.w, dst.h, dst.format, dst.base, dst.handle, src.w, src.h, src.format, src.base, src.handle, drect.l, drect.t, drect.r, drect.b, srect.l, srect.t, srect.r, srect.b, it.r.l, it.r.t, it.r.r, it.r.b ); err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); } } if (err != NO_ERROR) { if (err != NO_ERROR) { Loading
opengl/libs/EGL/egl.cpp +24 −4 Original line number Original line Diff line number Diff line Loading @@ -1641,8 +1641,13 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, if (dp == 0) { if (dp == 0) { return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR); return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR); } } // since we don't have a way to know which implementation to call, // we're calling all of them /* Since we don't have a way to know which implementation to call, * we're calling all of them. If at least one of the implementation * succeeded, this is a success. */ EGLint currentError = eglGetError(); EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; bool success = false; bool success = false; Loading @@ -1659,8 +1664,23 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, } } } } } } if (!success) if (!success) { // failure, if there was an error when we entered this function, // the error flag must not be updated. // Otherwise, the error is whatever happened in the implementation // that faulted. if (currentError != EGL_SUCCESS) { setError(currentError, EGL_NO_IMAGE_KHR); } return EGL_NO_IMAGE_KHR; return EGL_NO_IMAGE_KHR; } else { // In case of success, we need to clear all error flags // (especially those caused by the implementation that didn't // succeed). TODO: we could about this if we knew this was // a "full" success (all implementation succeeded). eglGetError(); } egl_image_t* result = new egl_image_t(dpy, ctx); egl_image_t* result = new egl_image_t(dpy, ctx); memcpy(result->images, implImages, sizeof(implImages)); memcpy(result->images, implImages, sizeof(implImages)); Loading