summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-10-12 13:44:11 -1000
committerEthan Chen <intervigil@gmail.com>2015-10-12 23:36:09 -0700
commit3141dc73b6865e8931f4a622b5eaa0a81e7a0f1d (patch)
tree4da116abdc19a94e9c33c0209eb39643a1bf5035
parent0bef28f4e6a2840486eaf26b5a9afd7072971973 (diff)
downloadframeworks_native-3141dc73b6865e8931f4a622b5eaa0a81e7a0f1d.zip
frameworks_native-3141dc73b6865e8931f4a622b5eaa0a81e7a0f1d.tar.gz
frameworks_native-3141dc73b6865e8931f4a622b5eaa0a81e7a0f1d.tar.bz2
surfaceflinger: Clean up use of QC extended API
Change-Id: I1256605e63e90f3baaa213453246fb0e44e0c770
-rw-r--r--services/surfaceflinger/Android.mk5
-rw-r--r--services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h2
-rw-r--r--services/surfaceflinger/DisplayUtils.cpp24
-rw-r--r--services/surfaceflinger/Layer.h2
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h2
5 files changed, 26 insertions, 9 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 344d0dd..b1fc73f 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -106,11 +106,10 @@ LOCAL_SHARED_LIBRARIES := \
libgui \
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)
+ 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)/libqdutils
LOCAL_SHARED_LIBRARIES += libqdutils
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
index 8b153d3..3d0e412 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
@@ -72,7 +72,9 @@ class VirtualDisplaySurface : public DisplaySurface,
public BnGraphicBufferProducer,
private ConsumerBase {
public:
+#ifdef QTI_BSP
friend class ExVirtualDisplaySurface;
+#endif
VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
const sp<IGraphicBufferProducer>& sink,
diff --git a/services/surfaceflinger/DisplayUtils.cpp b/services/surfaceflinger/DisplayUtils.cpp
index e4e2183..1f4c21c 100644
--- a/services/surfaceflinger/DisplayUtils.cpp
+++ b/services/surfaceflinger/DisplayUtils.cpp
@@ -39,11 +39,14 @@
#include "RenderEngine/RenderEngine.h"
#include "DisplayHardware/FramebufferSurface.h"
#include "DisplayUtils.h"
+#ifdef QTI_BSP
#include <ExSurfaceFlinger.h>
#include <ExLayer.h>
#include <DisplayHardware/ExHWComposer.h>
#include <DisplayHardware/ExVirtualDisplaySurface.h>
+#endif
#include <dlfcn.h>
+#include <cutils/properties.h>
namespace android {
@@ -64,31 +67,34 @@ DisplayUtils* DisplayUtils::getInstance() {
}
SurfaceFlinger* DisplayUtils::getSFInstance() {
+#ifdef QTI_BSP
if(sUseExtendedImpls) {
return new ExSurfaceFlinger();
- } else {
- return new SurfaceFlinger();
}
+#endif
+ return new SurfaceFlinger();
}
Layer* DisplayUtils::getLayerInstance(SurfaceFlinger* flinger,
const sp<Client>& client, const String8& name,
uint32_t w, uint32_t h, uint32_t flags) {
+#ifdef QTI_BSP
if(sUseExtendedImpls) {
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(
const sp<SurfaceFlinger>& flinger,
HWComposer::EventHandler& handler) {
+#ifdef QTI_BSP
if(sUseExtendedImpls) {
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,
@@ -97,6 +103,7 @@ void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
sp<IGraphicBufferConsumer> bqConsumer, String8 currentStateDisplayName,
bool currentStateIsSecure, int currentStateType)
{
+#ifdef QTI_BSP
if(sUseExtendedImpls) {
if(hwc->isVDSEnabled()) {
VirtualDisplaySurface* vds = new ExVirtualDisplaySurface(*hwc, hwcDisplayId,
@@ -112,11 +119,16 @@ void DisplayUtils::initVDSInstance(HWComposer* hwc, int32_t hwcDisplayId,
producer = vds;
}
} else {
+#endif
+ (void)currentStateIsSecure;
+ (void)currentStateType;
VirtualDisplaySurface* vds = new VirtualDisplaySurface(*hwc, hwcDisplayId,
currentStateSurface, bqProducer, bqConsumer, currentStateDisplayName);
dispSurface = vds;
producer = vds;
+#ifdef QTI_BSP
}
+#endif
}
bool DisplayUtils::createV4L2BasedVirtualDisplay(HWComposer* hwc, int32_t &hwcDisplayId,
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 910ac97..8115ad0 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -71,7 +71,9 @@ class Layer : public SurfaceFlingerConsumer::ContentsChangedListener {
static int32_t sSequence;
public:
+#ifdef QTI_BSP
friend class ExLayer;
+#endif
mutable bool contentDirty;
// regions below are in window-manager space
Region visibleRegion;
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 2c50432..6e5df04 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -84,7 +84,9 @@ class SurfaceFlinger : public BnSurfaceComposer,
private HWComposer::EventHandler
{
public:
+#ifdef QTI_BSP
friend class ExSurfaceFlinger;
+#endif
static char const* getServiceName() ANDROID_API {
return "SurfaceFlinger";