Loading include/ui/FramebufferNativeWindow.h +0 −6 Original line number Diff line number Diff line Loading @@ -55,9 +55,6 @@ public: bool isUpdateOnDemand() const { return mUpdateOnDemand; } status_t setUpdateRectangle(const Rect& updateRect); // FIXME: needed for copybit hack in LayerBuffer android_native_buffer_t const* getBackbuffer() const; private: friend class LightRefBase<FramebufferNativeWindow>; ~FramebufferNativeWindow(); // this class cannot be overloaded Loading @@ -78,9 +75,6 @@ private: int32_t mNumFreeBuffers; int32_t mBufferHead; bool mUpdateOnDemand; // FIXME: for getBackbuffer int32_t mLastDequeued; }; // --------------------------------------------------------------------------- Loading libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -348,8 +348,3 @@ void DisplayHardware::makeCurrent() const { eglMakeCurrent(mDisplay, mSurface, mSurface, mContext); } sp<FramebufferNativeWindow> DisplayHardware::getFb() const { return mNativeWindow; } libs/surfaceflinger/DisplayHardware/DisplayHardware.h +0 −3 Original line number Diff line number Diff line Loading @@ -84,9 +84,6 @@ public: return Rect(mWidth, mHeight); } // FIXME: needed in LayerBuffer for msm7k/copybit hack sp<FramebufferNativeWindow> getFb() const; private: void init(uint32_t displayIndex) __attribute__((noinline)); void fini() __attribute__((noinline)); Loading libs/surfaceflinger/LayerBuffer.cpp +42 −37 Original line number Diff line number Diff line Loading @@ -468,16 +468,19 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } #endif #ifdef EGL_ANDROID_get_render_buffer EGLDisplay dpy = eglGetCurrentDisplay(); EGLSurface draw = eglGetCurrentSurface(EGL_DRAW); EGLClientBuffer clientBuf = eglGetRenderBufferANDROID(dpy, draw); android_native_buffer_t* nb = (android_native_buffer_t*)clientBuf; if (nb == 0) { err = BAD_VALUE; } else { copybit_image_t dst; const DisplayHardware& hw(mLayer.graphicPlane(0).displayHardware()); sp<FramebufferNativeWindow> fbw = hw.getFb(); android_native_buffer_t const* nb = fbw->getBackbuffer(); native_handle_t const* hnd = nb->handle; dst.w = 320; dst.h = 480; dst.format = 4; dst.base = 0; dst.w = nb->width; dst.h = nb->height; dst.format = nb->format; dst.base = NULL; // unused by copybit on msm7k dst.handle = (native_handle_t *)nb->handle; const Rect& transformedBounds = mLayer.getTransformedBounds(); Loading Loading @@ -508,6 +511,8 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const LOGE("copybit failed (%s)", strerror(err)); } } } #endif if (!copybit || err) { Loading libs/ui/FramebufferNativeWindow.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -63,11 +63,6 @@ private: }; android_native_buffer_t const* FramebufferNativeWindow::getBackbuffer() const { return static_cast<android_native_buffer_t const*>(buffers[mLastDequeued].get()); } /* * This implements the (main) framebuffer management. This class is used * mostly by SurfaceFlinger, but also by command line GL application. Loading Loading @@ -170,7 +165,6 @@ int FramebufferNativeWindow::dequeueBuffer(android_native_window_t* window, if (self->mBufferHead >= self->mNumBuffers) self->mBufferHead = 0; self->mLastDequeued = index; *buffer = self->buffers[index].get(); return 0; Loading Loading
include/ui/FramebufferNativeWindow.h +0 −6 Original line number Diff line number Diff line Loading @@ -55,9 +55,6 @@ public: bool isUpdateOnDemand() const { return mUpdateOnDemand; } status_t setUpdateRectangle(const Rect& updateRect); // FIXME: needed for copybit hack in LayerBuffer android_native_buffer_t const* getBackbuffer() const; private: friend class LightRefBase<FramebufferNativeWindow>; ~FramebufferNativeWindow(); // this class cannot be overloaded Loading @@ -78,9 +75,6 @@ private: int32_t mNumFreeBuffers; int32_t mBufferHead; bool mUpdateOnDemand; // FIXME: for getBackbuffer int32_t mLastDequeued; }; // --------------------------------------------------------------------------- Loading
libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -348,8 +348,3 @@ void DisplayHardware::makeCurrent() const { eglMakeCurrent(mDisplay, mSurface, mSurface, mContext); } sp<FramebufferNativeWindow> DisplayHardware::getFb() const { return mNativeWindow; }
libs/surfaceflinger/DisplayHardware/DisplayHardware.h +0 −3 Original line number Diff line number Diff line Loading @@ -84,9 +84,6 @@ public: return Rect(mWidth, mHeight); } // FIXME: needed in LayerBuffer for msm7k/copybit hack sp<FramebufferNativeWindow> getFb() const; private: void init(uint32_t displayIndex) __attribute__((noinline)); void fini() __attribute__((noinline)); Loading
libs/surfaceflinger/LayerBuffer.cpp +42 −37 Original line number Diff line number Diff line Loading @@ -468,16 +468,19 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } #endif #ifdef EGL_ANDROID_get_render_buffer EGLDisplay dpy = eglGetCurrentDisplay(); EGLSurface draw = eglGetCurrentSurface(EGL_DRAW); EGLClientBuffer clientBuf = eglGetRenderBufferANDROID(dpy, draw); android_native_buffer_t* nb = (android_native_buffer_t*)clientBuf; if (nb == 0) { err = BAD_VALUE; } else { copybit_image_t dst; const DisplayHardware& hw(mLayer.graphicPlane(0).displayHardware()); sp<FramebufferNativeWindow> fbw = hw.getFb(); android_native_buffer_t const* nb = fbw->getBackbuffer(); native_handle_t const* hnd = nb->handle; dst.w = 320; dst.h = 480; dst.format = 4; dst.base = 0; dst.w = nb->width; dst.h = nb->height; dst.format = nb->format; dst.base = NULL; // unused by copybit on msm7k dst.handle = (native_handle_t *)nb->handle; const Rect& transformedBounds = mLayer.getTransformedBounds(); Loading Loading @@ -508,6 +511,8 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const LOGE("copybit failed (%s)", strerror(err)); } } } #endif if (!copybit || err) { Loading
libs/ui/FramebufferNativeWindow.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -63,11 +63,6 @@ private: }; android_native_buffer_t const* FramebufferNativeWindow::getBackbuffer() const { return static_cast<android_native_buffer_t const*>(buffers[mLastDequeued].get()); } /* * This implements the (main) framebuffer management. This class is used * mostly by SurfaceFlinger, but also by command line GL application. Loading Loading @@ -170,7 +165,6 @@ int FramebufferNativeWindow::dequeueBuffer(android_native_window_t* window, if (self->mBufferHead >= self->mNumBuffers) self->mBufferHead = 0; self->mLastDequeued = index; *buffer = self->buffers[index].get(); return 0; Loading