diff options
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/Android.mk | 10 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 6 | ||||
-rw-r--r-- | services/surfaceflinger/sigchain_proxy.cpp | 17 | ||||
-rw-r--r-- | services/surfaceflinger/tests/Android.mk | 8 |
4 files changed, 10 insertions, 31 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 76545f3..eade2e2 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -115,15 +115,11 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic -LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" -Iart +LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" LOCAL_CPPFLAGS:= -std=c++11 -# TODO: Trying to link libsigchain as a static library prevents -# static linker from exporting necessary symbols. So as a workaround -# we use sigchain.o LOCAL_SRC_FILES:= \ - main_surfaceflinger.cpp \ - sigchain_proxy.cpp + main_surfaceflinger.cpp LOCAL_SHARED_LIBRARIES := \ libsurfaceflinger \ @@ -133,6 +129,8 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libdl +LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain + LOCAL_MODULE:= surfaceflinger ifdef TARGET_32_BIT_SURFACEFLINGER diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index cc47e16..0645a86 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1274,7 +1274,11 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) // this display is in both lists. see if something changed. const DisplayDeviceState& state(curr[j]); const wp<IBinder>& display(curr.keyAt(j)); - if (state.surface->asBinder() != draw[i].surface->asBinder()) { + const sp<IBinder> state_binder = + state.surface != NULL ? state.surface->asBinder() : NULL; + const sp<IBinder> draw_binder = + draw[i].surface != NULL ? draw[i].surface->asBinder() : NULL; + if (state_binder != draw_binder) { // changing the surface is like destroying and // recreating the DisplayDevice, so we just remove it // from the drawing state, so that it get re-added diff --git a/services/surfaceflinger/sigchain_proxy.cpp b/services/surfaceflinger/sigchain_proxy.cpp deleted file mode 100644 index bb7a678..0000000 --- a/services/surfaceflinger/sigchain_proxy.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "sigchainlib/sigchain.cc" diff --git a/services/surfaceflinger/tests/Android.mk b/services/surfaceflinger/tests/Android.mk index e210860..979062e 100644 --- a/services/surfaceflinger/tests/Android.mk +++ b/services/surfaceflinger/tests/Android.mk @@ -1,6 +1,7 @@ # Build the unit tests, LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := SurfaceFlinger_test @@ -15,16 +16,9 @@ LOCAL_SHARED_LIBRARIES := \ libbinder \ libcutils \ libgui \ - libstlport \ libui \ libutils \ -LOCAL_C_INCLUDES := \ - bionic \ - bionic/libstdc++/include \ - external/gtest/include \ - external/stlport/stlport \ - # Build the binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) # to integrate with auto-test framework. include $(BUILD_NATIVE_TEST) |