From cfa275908a220c5e1cf496f7fdde1c04e24e95da Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 17 Aug 2010 20:19:23 -0700 Subject: revert hwcomposer HAL changes. DO NOT MERGE. This reverts commit: 94364b91a2894bf037b8beb027132fbb812e1434 f8e705dea48f77f1c2532fdbadd4997dd1851af0 b59beb5ca68d0228f60dda60d85e2d0226b33215 e0d5f5bcf5a8b26f4ad75f549cbf380b2c9faf20 --- services/surfaceflinger/Layer.cpp | 57 --------------------------------------- 1 file changed, 57 deletions(-) (limited to 'services/surfaceflinger/Layer.cpp') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 3720e1669..629d993 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -35,7 +35,6 @@ #include "Layer.h" #include "SurfaceFlinger.h" #include "DisplayHardware/DisplayHardware.h" -#include "DisplayHardware/HWComposer.h" #define DEBUG_RESIZE 0 @@ -178,62 +177,6 @@ status_t Layer::setBuffers( uint32_t w, uint32_t h, return NO_ERROR; } -void Layer::setGeometry(hwc_layer_t* hwcl) -{ - hwcl->compositionType = HWC_FRAMEBUFFER; - hwcl->hints = 0; - hwcl->flags = 0; - hwcl->transform = 0; - hwcl->blending = HWC_BLENDING_NONE; - - // we can't do alpha-fade with the hwc HAL - const State& s(drawingState()); - if (s.alpha < 0xFF) { - hwcl->flags = HWC_SKIP_LAYER; - return; - } - - // we can only handle simple transformation - if (mOrientation & Transform::ROT_INVALID) { - hwcl->flags = HWC_SKIP_LAYER; - return; - } - - hwcl->transform = mOrientation; - - if (needsBlending()) { - hwcl->blending = mPremultipliedAlpha ? - HWC_BLENDING_PREMULT : HWC_BLENDING_COVERAGE; - } - - hwcl->displayFrame.left = mTransformedBounds.left; - hwcl->displayFrame.top = mTransformedBounds.top; - hwcl->displayFrame.right = mTransformedBounds.right; - hwcl->displayFrame.bottom = mTransformedBounds.bottom; - - hwcl->visibleRegionScreen.rects = - reinterpret_cast( - visibleRegionScreen.getArray( - &hwcl->visibleRegionScreen.numRects)); -} - -void Layer::setPerFrameData(hwc_layer_t* hwcl) { - sp buffer(mBufferManager.getActiveBuffer()); - if (buffer == NULL) { - // this situation can happen if we ran out of memory for instance. - // not much we can do. continue to use whatever texture was bound - // to this context. - hwcl->handle = NULL; - return; - } - hwcl->handle = const_cast(buffer->handle); - // TODO: set the crop value properly - hwcl->sourceCrop.left = 0; - hwcl->sourceCrop.top = 0; - hwcl->sourceCrop.right = buffer->width; - hwcl->sourceCrop.bottom = buffer->height; -} - void Layer::reloadTexture(const Region& dirty) { sp buffer(mBufferManager.getActiveBuffer()); -- cgit v1.1