Merge "Expand WebKitHitTest and do some preliminary caching"
diff --git a/include/utils/TypeHelpers.h b/include/utils/TypeHelpers.h
index 7b4fb70..1f2c2d5 100644
--- a/include/utils/TypeHelpers.h
+++ b/include/utils/TypeHelpers.h
@@ -233,19 +233,15 @@
}
};
-template<>
template <typename K, typename V>
struct trait_trivial_ctor< key_value_pair_t<K, V> >
{ enum { value = aggregate_traits<K,V>::has_trivial_ctor }; };
-template<>
template <typename K, typename V>
struct trait_trivial_dtor< key_value_pair_t<K, V> >
{ enum { value = aggregate_traits<K,V>::has_trivial_dtor }; };
-template<>
template <typename K, typename V>
struct trait_trivial_copy< key_value_pair_t<K, V> >
{ enum { value = aggregate_traits<K,V>::has_trivial_copy }; };
-template<>
template <typename K, typename V>
struct trait_trivial_move< key_value_pair_t<K, V> >
{ enum { value = aggregate_traits<K,V>::has_trivial_move }; };
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp
index 5ebdbd9..8fe96b1 100644
--- a/libs/gui/ISurfaceComposerClient.cpp
+++ b/libs/gui/ISurfaceComposerClient.cpp
@@ -35,15 +35,6 @@
// ---------------------------------------------------------------------------
-/* ideally AID_GRAPHICS would be in a semi-public header
- * or there would be a way to map a user/group name to its id
- */
-#ifndef AID_GRAPHICS
-#define AID_GRAPHICS 1003
-#endif
-
-// ---------------------------------------------------------------------------
-
namespace android {
enum {
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 035836e..80ab519 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -102,7 +102,7 @@
nsecs_t timestamp;
DisplayEventReceiver::Event vsync;
- KeyedVector< wp<DisplayEventConnection>, ConnectionInfo > displayEventConnections;
+ Vector< wp<DisplayEventConnection> > displayEventConnections;
{ // scope for the lock
Mutex::Autolock _l(mLock);
@@ -153,6 +153,9 @@
}
info.count--;
}
+ if (reportVsync) {
+ displayEventConnections.add(mDisplayEventConnections.keyAt(i));
+ }
}
if (reportVsync) {
@@ -164,15 +167,11 @@
vsync.header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;
vsync.header.timestamp = timestamp;
vsync.vsync.count = mDeliveredEvents;
-
- // make a copy of our connection list, so we can
- // dispatch events without holding mLock
- displayEventConnections = mDisplayEventConnections;
}
const size_t count = displayEventConnections.size();
for (size_t i=0 ; i<count ; i++) {
- sp<DisplayEventConnection> conn(displayEventConnections.keyAt(i).promote());
+ sp<DisplayEventConnection> conn(displayEventConnections[i].promote());
// make sure the connection didn't die
if (conn != NULL) {
status_t err = conn->postEvent(vsync);
@@ -186,12 +185,12 @@
// handle any other error on the pipe as fatal. the only
// reasonable thing to do is to clean-up this connection.
// The most common error we'll get here is -EPIPE.
- removeDisplayEventConnection(displayEventConnections.keyAt(i));
+ removeDisplayEventConnection(displayEventConnections[i]);
}
} else {
// somehow the connection is dead, but we still have it in our list
// just clean the list.
- removeDisplayEventConnection(displayEventConnections.keyAt(i));
+ removeDisplayEventConnection(displayEventConnections[i]);
}
}
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 42ae408..af47402 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -59,15 +59,9 @@
#include "DisplayHardware/DisplayHardware.h"
#include "DisplayHardware/HWComposer.h"
+#include <private/android_filesystem_config.h>
#include <private/surfaceflinger/SharedBufferStack.h>
-/* ideally AID_GRAPHICS would be in a semi-public header
- * or there would be a way to map a user/group name to its id
- */
-#ifndef AID_GRAPHICS
-#define AID_GRAPHICS 1003
-#endif
-
#define EGL_VERSION_HW_ANDROID 0x3143
#define DISPLAY_COUNT 1