surfaceflinger: Clean up use of QC extended API
Change-Id: I1256605e63e90f3baaa213453246fb0e44e0c770
This commit is contained in:
parent
0bef28f4e6
commit
3141dc73b6
|
@ -106,11 +106,10 @@ LOCAL_SHARED_LIBRARIES := \
|
||||||
libgui \
|
libgui \
|
||||||
libpowermanager
|
libpowermanager
|
||||||
|
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES += libexsurfaceflinger
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/display-frameworks/native/services/surfaceflinger/
|
|
||||||
|
|
||||||
ifeq ($(TARGET_USES_QCOM_BSP), true)
|
ifeq ($(TARGET_USES_QCOM_BSP), true)
|
||||||
|
LOCAL_WHOLE_STATIC_LIBRARIES += libexsurfaceflinger
|
||||||
|
LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/vendor/qcom/opensource/display-frameworks/native/services/surfaceflinger/
|
||||||
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc
|
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc
|
||||||
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libqdutils
|
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libqdutils
|
||||||
LOCAL_SHARED_LIBRARIES += libqdutils
|
LOCAL_SHARED_LIBRARIES += libqdutils
|
||||||
|
|
|
@ -72,7 +72,9 @@ class VirtualDisplaySurface : public DisplaySurface,
|
||||||
public BnGraphicBufferProducer,
|
public BnGraphicBufferProducer,
|
||||||
private ConsumerBase {
|
private ConsumerBase {
|
||||||
public:
|
public:
|
||||||
|
#ifdef QTI_BSP
|
||||||
friend class ExVirtualDisplaySurface;
|
friend class ExVirtualDisplaySurface;
|
||||||
|
#endif
|
||||||
|
|
||||||
VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
|
VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
|
||||||
const sp<IGraphicBufferProducer>& sink,
|
const sp<IGraphicBufferProducer>& sink,
|
||||||
|
|
|
@ -39,11 +39,14 @@
|
||||||
#include "RenderEngine/RenderEngine.h"
|
#include "RenderEngine/RenderEngine.h"
|
||||||
#include "DisplayHardware/FramebufferSurface.h"
|
#include "DisplayHardware/FramebufferSurface.h"
|
||||||
#include "DisplayUtils.h"
|
#include "DisplayUtils.h"
|
||||||
|
#ifdef QTI_BSP
|
||||||
#include <ExSurfaceFlinger.h>
|
#include <ExSurfaceFlinger.h>
|
||||||
#include <ExLayer.h>
|
#include <ExLayer.h>
|
||||||
#include <DisplayHardware/ExHWComposer.h>
|
#include <DisplayHardware/ExHWComposer.h>
|
||||||
#include <DisplayHardware/ExVirtualDisplaySurface.h>
|
#include <DisplayHardware/ExVirtualDisplaySurface.h>
|
||||||
|
#endif
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <cutils/properties.h>
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
|
@ -64,31 +67,34 @@ DisplayUtils* DisplayUtils::getInstance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceFlinger* DisplayUtils::getSFInstance() {
|
SurfaceFlinger* DisplayUtils::getSFInstance() {
|
||||||
|
#ifdef QTI_BSP
|
||||||
if(sUseExtendedImpls) {
|
if(sUseExtendedImpls) {
|
||||||
return new ExSurfaceFlinger();
|
return new ExSurfaceFlinger();
|
||||||
} else {
|
|
||||||
return new SurfaceFlinger();
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return new SurfaceFlinger();
|
||||||
}
|
}
|
||||||
|
|
||||||
Layer* DisplayUtils::getLayerInstance(SurfaceFlinger* flinger,
|
Layer* DisplayUtils::getLayerInstance(SurfaceFlinger* flinger,
|
||||||
const sp<Client>& client, const String8& name,
|
const sp<Client>& client, const String8& name,
|
||||||
uint32_t w, uint32_t h, uint32_t flags) {
|
uint32_t w, uint32_t h, uint32_t flags) {
|
||||||
|
#ifdef QTI_BSP
|
||||||
if(sUseExtendedImpls) {
|
if(sUseExtendedImpls) {
|
||||||
return new ExLayer(flinger, client, name, w, h, flags);
|
return new ExLayer(flinger, client, name, w, h, flags);
|
||||||
} else {
|
|
||||||
return new Layer(flinger, client, name, w, h, flags);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return new Layer(flinger, client, name, w, h, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWComposer* DisplayUtils::getHWCInstance(
|
HWComposer* DisplayUtils::getHWCInstance(
|
||||||
const sp<SurfaceFlinger>& flinger,
|
const sp<SurfaceFlinger>& flinger,
|
||||||
HWComposer::EventHandler& handler) {
|
HWComposer::EventHandler& handler) {
|
||||||
|
#ifdef QTI_BSP
|
||||||
if(sUseExtendedImpls) {
|
if(sUseExtendedImpls) {
|
||||||
return new ExHWComposer(flinger, handler);
|
return new ExHWComposer(flinger, handler);
|
||||||
} else {
|
|
||||||
return new HWComposer(flinger,handler);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return new HWComposer(flinger,handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
|
void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
|
||||||
|
@ -97,6 +103,7 @@ void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
|
||||||
sp<IGraphicBufferConsumer> bqConsumer, String8 currentStateDisplayName,
|
sp<IGraphicBufferConsumer> bqConsumer, String8 currentStateDisplayName,
|
||||||
bool currentStateIsSecure, int currentStateType)
|
bool currentStateIsSecure, int currentStateType)
|
||||||
{
|
{
|
||||||
|
#ifdef QTI_BSP
|
||||||
if(sUseExtendedImpls) {
|
if(sUseExtendedImpls) {
|
||||||
if(hwc->isVDSEnabled()) {
|
if(hwc->isVDSEnabled()) {
|
||||||
VirtualDisplaySurface* vds = new ExVirtualDisplaySurface(*hwc, hwcDisplayId,
|
VirtualDisplaySurface* vds = new ExVirtualDisplaySurface(*hwc, hwcDisplayId,
|
||||||
|
@ -112,11 +119,16 @@ void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
|
||||||
producer = vds;
|
producer = vds;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
|
(void)currentStateIsSecure;
|
||||||
|
(void)currentStateType;
|
||||||
VirtualDisplaySurface* vds = new VirtualDisplaySurface(*hwc, hwcDisplayId,
|
VirtualDisplaySurface* vds = new VirtualDisplaySurface(*hwc, hwcDisplayId,
|
||||||
currentStateSurface, bqProducer, bqConsumer, currentStateDisplayName);
|
currentStateSurface, bqProducer, bqConsumer, currentStateDisplayName);
|
||||||
dispSurface = vds;
|
dispSurface = vds;
|
||||||
producer = vds;
|
producer = vds;
|
||||||
|
#ifdef QTI_BSP
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisplayUtils::createV4L2BasedVirtualDisplay(HWComposer* hwc, int32_t &hwcDisplayId,
|
bool DisplayUtils::createV4L2BasedVirtualDisplay(HWComposer* hwc, int32_t &hwcDisplayId,
|
||||||
|
|
|
@ -71,7 +71,9 @@ class Layer : public SurfaceFlingerConsumer::ContentsChangedListener {
|
||||||
static int32_t sSequence;
|
static int32_t sSequence;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
#ifdef QTI_BSP
|
||||||
friend class ExLayer;
|
friend class ExLayer;
|
||||||
|
#endif
|
||||||
mutable bool contentDirty;
|
mutable bool contentDirty;
|
||||||
// regions below are in window-manager space
|
// regions below are in window-manager space
|
||||||
Region visibleRegion;
|
Region visibleRegion;
|
||||||
|
|
|
@ -84,7 +84,9 @@ class SurfaceFlinger : public BnSurfaceComposer,
|
||||||
private HWComposer::EventHandler
|
private HWComposer::EventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#ifdef QTI_BSP
|
||||||
friend class ExSurfaceFlinger;
|
friend class ExSurfaceFlinger;
|
||||||
|
#endif
|
||||||
|
|
||||||
static char const* getServiceName() ANDROID_API {
|
static char const* getServiceName() ANDROID_API {
|
||||||
return "SurfaceFlinger";
|
return "SurfaceFlinger";
|
||||||
|
|
Loading…
Reference in New Issue