summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/Android.mk30
-rw-r--r--services/surfaceflinger/DdmConnection.cpp8
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp2
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplaySurface.h2
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp18
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.h5
-rw-r--r--services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp2
-rw-r--r--services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h3
8 files changed, 29 insertions, 41 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index f1ddbe2..342d685 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -1,10 +1,10 @@
-LOCAL_PATH:= $(call my-dir)
+LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CLANG := true
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-LOCAL_SRC_FILES:= \
+LOCAL_SRC_FILES := \
Client.cpp \
DisplayDevice.cpp \
DispSync.cpp \
@@ -37,7 +37,7 @@ LOCAL_SRC_FILES:= \
RenderEngine/GLES20RenderEngine.cpp
-LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
+LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
ifeq ($(TARGET_BOARD_PLATFORM),omap4)
@@ -84,7 +84,7 @@ else
endif
LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
-LOCAL_CFLAGS += -std=c++11
+LOCAL_CPPFLAGS := -std=c++11
LOCAL_SHARED_LIBRARIES := \
libcutils \
@@ -100,7 +100,7 @@ LOCAL_SHARED_LIBRARIES := \
libgui \
libpowermanager
-LOCAL_MODULE:= libsurfaceflinger
+LOCAL_MODULE := libsurfaceflinger
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
@@ -110,11 +110,13 @@ include $(BUILD_SHARED_LIBRARY)
# build surfaceflinger's executable
include $(CLEAR_VARS)
+LOCAL_CLANG := true
+
LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
-LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
-LOCAL_CPPFLAGS:= -std=c++11
+LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
+LOCAL_CPPFLAGS := -std=c++11
-LOCAL_SRC_FILES:= \
+LOCAL_SRC_FILES := \
main_surfaceflinger.cpp
LOCAL_SHARED_LIBRARIES := \
@@ -127,7 +129,7 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
-LOCAL_MODULE:= surfaceflinger
+LOCAL_MODULE := surfaceflinger
ifdef TARGET_32_BIT_SURFACEFLINGER
LOCAL_32_BIT_ONLY := true
@@ -141,9 +143,13 @@ include $(BUILD_EXECUTABLE)
# uses jni which may not be available in PDK
ifneq ($(wildcard libnativehelper/include),)
include $(CLEAR_VARS)
-LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
-LOCAL_SRC_FILES:= \
+LOCAL_CLANG := true
+
+LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
+LOCAL_CPPFLAGS := -std=c++11
+
+LOCAL_SRC_FILES := \
DdmConnection.cpp
LOCAL_SHARED_LIBRARIES := \
@@ -151,7 +157,7 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libdl
-LOCAL_MODULE:= libsurfaceflinger_ddmconnection
+LOCAL_MODULE := libsurfaceflinger_ddmconnection
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
diff --git a/services/surfaceflinger/DdmConnection.cpp b/services/surfaceflinger/DdmConnection.cpp
index 5143b98..a000a84 100644
--- a/services/surfaceflinger/DdmConnection.cpp
+++ b/services/surfaceflinger/DdmConnection.cpp
@@ -59,12 +59,14 @@ void DdmConnection::start(const char* name) {
}
jint (*JNI_CreateJavaVM)(JavaVM** p_vm, JNIEnv** p_env, void* vm_args);
- JNI_CreateJavaVM = (__typeof__(JNI_CreateJavaVM))dlsym(libart_dso, "JNI_CreateJavaVM");
+ JNI_CreateJavaVM = reinterpret_cast<decltype(JNI_CreateJavaVM)>(
+ dlsym(libart_dso, "JNI_CreateJavaVM"));
ALOGE_IF(!JNI_CreateJavaVM, "DdmConnection: %s", dlerror());
jint (*registerNatives)(JNIEnv* env, jclass clazz);
- registerNatives = (__typeof__(registerNatives))dlsym(libandroid_runtime_dso,
- "Java_com_android_internal_util_WithFramework_registerNatives");
+ registerNatives = reinterpret_cast<decltype(registerNatives)>(
+ dlsym(libandroid_runtime_dso,
+ "Java_com_android_internal_util_WithFramework_registerNatives"));
ALOGE_IF(!registerNatives, "DdmConnection: %s", dlerror());
if (!JNI_CreateJavaVM || !registerNatives) {
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 9a2411a..13d44f3 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -517,6 +517,6 @@ void DisplayDevice::dump(String8& result) const {
tr[0][2], tr[1][2], tr[2][2]);
String8 surfaceDump;
- mDisplaySurface->dump(surfaceDump);
+ mDisplaySurface->dumpAsString(surfaceDump);
result.append(surfaceDump);
}
diff --git a/services/surfaceflinger/DisplayHardware/DisplaySurface.h b/services/surfaceflinger/DisplayHardware/DisplaySurface.h
index e60c4fb..2f743c1 100644
--- a/services/surfaceflinger/DisplayHardware/DisplaySurface.h
+++ b/services/surfaceflinger/DisplayHardware/DisplaySurface.h
@@ -70,7 +70,7 @@ public:
// frame's buffer.
virtual void onFrameCommitted() = 0;
- virtual void dump(String8& result) const = 0;
+ virtual void dumpAsString(String8& result) const = 0;
virtual void resizeBuffers(const uint32_t w, const uint32_t h) = 0;
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index 342016e..f9d76d1 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -160,23 +160,7 @@ status_t FramebufferSurface::compositionComplete()
return mHwc.fbCompositionComplete();
}
-// Since DisplaySurface and ConsumerBase both have a method with this
-// signature, results will vary based on the static pointer type the caller is
-// using:
-// void dump(FrameBufferSurface* fbs, String8& s) {
-// // calls FramebufferSurface::dump()
-// fbs->dump(s);
-//
-// // calls ConsumerBase::dump() since it is non-virtual
-// static_cast<ConsumerBase*>(fbs)->dump(s);
-//
-// // calls FramebufferSurface::dump() since it is virtual
-// static_cast<DisplaySurface*>(fbs)->dump(s);
-// }
-// To make sure that all of these end up doing the same thing, we just redirect
-// to ConsumerBase::dump() here. It will take the internal lock, and then call
-// virtual dumpLocked(), which is where the real work happens.
-void FramebufferSurface::dump(String8& result) const {
+void FramebufferSurface::dumpAsString(String8& result) const {
ConsumerBase::dump(result);
}
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
index d0bf22b..6ffc52d 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.h
@@ -44,10 +44,7 @@ public:
virtual status_t compositionComplete();
virtual status_t advanceFrame();
virtual void onFrameCommitted();
-
- // Implementation of DisplaySurface::dump(). Note that ConsumerBase also
- // has a non-virtual dump() with the same signature.
- virtual void dump(String8& result) const;
+ virtual void dumpAsString(String8& result) const;
// Cannot resize a buffers in a FramebufferSurface. Only works with virtual
// displays.
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index c3d45ee..e0f32e9 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -254,7 +254,7 @@ void VirtualDisplaySurface::onFrameCommitted() {
resetPerFrameState();
}
-void VirtualDisplaySurface::dump(String8& /* result */) const {
+void VirtualDisplaySurface::dumpAsString(String8& /* result */) const {
}
void VirtualDisplaySurface::resizeBuffers(const uint32_t w, const uint32_t h) {
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
index 0fab7e2..2c14d6d 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
@@ -86,8 +86,7 @@ public:
virtual status_t compositionComplete();
virtual status_t advanceFrame();
virtual void onFrameCommitted();
- using BBinder::dump;
- virtual void dump(String8& result) const;
+ virtual void dumpAsString(String8& result) const;
virtual void resizeBuffers(const uint32_t w, const uint32_t h);
private: