Loading libs/surfaceflinger/LayerBlur.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client, int32_t i) : LayerBaseClient(flinger, display, client, i), mCacheDirty(true), mRefreshCache(true), mCacheAge(0), mTextureName(-1U), mWidthScale(1.0f), mHeightScale(1.0f) mWidthScale(1.0f), mHeightScale(1.0f), mBlurFormat(GGL_PIXEL_FORMAT_RGB_565) { } Loading libs/surfaceflinger/LayerBuffer.cpp +37 −24 Original line number Diff line number Diff line Loading @@ -33,14 +33,13 @@ #include "SurfaceFlinger.h" #include "DisplayHardware/DisplayHardware.h" #include "gralloc_priv.h" // needed for msm / copybit namespace android { // --------------------------------------------------------------------------- const uint32_t LayerBuffer::typeInfo = LayerBaseClient::typeInfo | 0x20; const char* const LayerBuffer::typeID = "LayerBuffer"; gralloc_module_t const* LayerBuffer::sGrallocModule = 0; // --------------------------------------------------------------------------- Loading @@ -60,6 +59,16 @@ void LayerBuffer::onFirstRef() LayerBaseClient::onFirstRef(); mSurface = new SurfaceLayerBuffer(mFlinger, clientIndex(), const_cast<LayerBuffer *>(this)); hw_module_t const* module = (hw_module_t const*)sGrallocModule; if (!module) { // NOTE: technically there is a race here, but it shouldn't // cause any problem since hw_get_module() always returns // the same value. if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) { sGrallocModule = (gralloc_module_t const *)module; } } } sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const Loading Loading @@ -243,7 +252,17 @@ LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers, ssize_t offset) : mBufferHeap(buffers) { NativeBuffer& src(mNativeBuffer); src.img.handle = 0; gralloc_module_t const * module = LayerBuffer::getGrallocModule(); if (module && module->perform) { int err = module->perform(module, GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER, buffers.heap->heapID(), buffers.heap->getSize(), offset, buffers.heap->base(), &src.img.handle); if (err == NO_ERROR) { src.crop.l = 0; src.crop.t = 0; src.crop.r = buffers.w; Loading @@ -253,20 +272,16 @@ LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers, ssize_t offset) src.img.h = buffers.ver_stride ?: buffers.h; src.img.format = buffers.format; src.img.base = (void*)(intptr_t(buffers.heap->base()) + offset); // FIXME: gross hack, we should never access private_handle_t from here, // but this is needed by msm drivers private_handle_t* hnd = new private_handle_t( buffers.heap->heapID(), buffers.heap->getSize(), 0); hnd->offset = offset; src.img.handle = hnd; } } } LayerBuffer::Buffer::~Buffer() { NativeBuffer& src(mNativeBuffer); if (src.img.handle) delete (private_handle_t*)src.img.handle; if (src.img.handle) { native_handle_delete(src.img.handle); } } // ============================================================================ Loading Loading @@ -437,9 +452,7 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } if (err != NO_ERROR) { // OpenGL fall-back GLuint w = 0; GLuint h = 0; // slower fallback GGLSurface t; t.version = sizeof(GGLSurface); t.width = src.crop.r; Loading libs/surfaceflinger/LayerBuffer.h +5 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ private: copybit_rect_t crop; }; static gralloc_module_t const* sGrallocModule; static gralloc_module_t const* getGrallocModule() { return sGrallocModule; } class Buffer : public LightRefBase<Buffer> { public: Buffer(const ISurface::BufferHeap& buffers, ssize_t offset); Loading libs/surfaceflinger/SurfaceFlinger.h +2 −0 Original line number Diff line number Diff line Loading @@ -246,8 +246,10 @@ private: virtual status_t readyToRun(); virtual void onFirstRef(); public: // hack to work around gcc 4.0.3 bug const GraphicPlane& graphicPlane(int dpy) const; GraphicPlane& graphicPlane(int dpy); private: void waitForEvent(); public: // hack to work around gcc 4.0.3 bug Loading opengl/libagl/copybit.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ private: static int iterate_done(copybit_region_t const *, copybit_rect_t*) { return 0; } public: copybit_rect_t r; }; Loading Loading @@ -421,6 +422,19 @@ static bool copybit(GLint x, GLint y, (enables & GGL_ENABLE_DITHER) ? COPYBIT_ENABLE : COPYBIT_DISABLE); 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); } if (err != NO_ERROR) { Loading Loading
libs/surfaceflinger/LayerBlur.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client, int32_t i) : LayerBaseClient(flinger, display, client, i), mCacheDirty(true), mRefreshCache(true), mCacheAge(0), mTextureName(-1U), mWidthScale(1.0f), mHeightScale(1.0f) mWidthScale(1.0f), mHeightScale(1.0f), mBlurFormat(GGL_PIXEL_FORMAT_RGB_565) { } Loading
libs/surfaceflinger/LayerBuffer.cpp +37 −24 Original line number Diff line number Diff line Loading @@ -33,14 +33,13 @@ #include "SurfaceFlinger.h" #include "DisplayHardware/DisplayHardware.h" #include "gralloc_priv.h" // needed for msm / copybit namespace android { // --------------------------------------------------------------------------- const uint32_t LayerBuffer::typeInfo = LayerBaseClient::typeInfo | 0x20; const char* const LayerBuffer::typeID = "LayerBuffer"; gralloc_module_t const* LayerBuffer::sGrallocModule = 0; // --------------------------------------------------------------------------- Loading @@ -60,6 +59,16 @@ void LayerBuffer::onFirstRef() LayerBaseClient::onFirstRef(); mSurface = new SurfaceLayerBuffer(mFlinger, clientIndex(), const_cast<LayerBuffer *>(this)); hw_module_t const* module = (hw_module_t const*)sGrallocModule; if (!module) { // NOTE: technically there is a race here, but it shouldn't // cause any problem since hw_get_module() always returns // the same value. if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module) == 0) { sGrallocModule = (gralloc_module_t const *)module; } } } sp<LayerBaseClient::Surface> LayerBuffer::createSurface() const Loading Loading @@ -243,7 +252,17 @@ LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers, ssize_t offset) : mBufferHeap(buffers) { NativeBuffer& src(mNativeBuffer); src.img.handle = 0; gralloc_module_t const * module = LayerBuffer::getGrallocModule(); if (module && module->perform) { int err = module->perform(module, GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER, buffers.heap->heapID(), buffers.heap->getSize(), offset, buffers.heap->base(), &src.img.handle); if (err == NO_ERROR) { src.crop.l = 0; src.crop.t = 0; src.crop.r = buffers.w; Loading @@ -253,20 +272,16 @@ LayerBuffer::Buffer::Buffer(const ISurface::BufferHeap& buffers, ssize_t offset) src.img.h = buffers.ver_stride ?: buffers.h; src.img.format = buffers.format; src.img.base = (void*)(intptr_t(buffers.heap->base()) + offset); // FIXME: gross hack, we should never access private_handle_t from here, // but this is needed by msm drivers private_handle_t* hnd = new private_handle_t( buffers.heap->heapID(), buffers.heap->getSize(), 0); hnd->offset = offset; src.img.handle = hnd; } } } LayerBuffer::Buffer::~Buffer() { NativeBuffer& src(mNativeBuffer); if (src.img.handle) delete (private_handle_t*)src.img.handle; if (src.img.handle) { native_handle_delete(src.img.handle); } } // ============================================================================ Loading Loading @@ -437,9 +452,7 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const } if (err != NO_ERROR) { // OpenGL fall-back GLuint w = 0; GLuint h = 0; // slower fallback GGLSurface t; t.version = sizeof(GGLSurface); t.width = src.crop.r; Loading
libs/surfaceflinger/LayerBuffer.h +5 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ private: copybit_rect_t crop; }; static gralloc_module_t const* sGrallocModule; static gralloc_module_t const* getGrallocModule() { return sGrallocModule; } class Buffer : public LightRefBase<Buffer> { public: Buffer(const ISurface::BufferHeap& buffers, ssize_t offset); Loading
libs/surfaceflinger/SurfaceFlinger.h +2 −0 Original line number Diff line number Diff line Loading @@ -246,8 +246,10 @@ private: virtual status_t readyToRun(); virtual void onFirstRef(); public: // hack to work around gcc 4.0.3 bug const GraphicPlane& graphicPlane(int dpy) const; GraphicPlane& graphicPlane(int dpy); private: void waitForEvent(); public: // hack to work around gcc 4.0.3 bug Loading
opengl/libagl/copybit.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ private: static int iterate_done(copybit_region_t const *, copybit_rect_t*) { return 0; } public: copybit_rect_t r; }; Loading Loading @@ -421,6 +422,19 @@ static bool copybit(GLint x, GLint y, (enables & GGL_ENABLE_DITHER) ? COPYBIT_ENABLE : COPYBIT_DISABLE); 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); } if (err != NO_ERROR) { Loading