resolved conflicts for merge of 67d8bd66 to lmp-dev-plus-aosp

Change-Id: Idbe39c6de8fe31ac57a9238c18b4c20d66dc73ad
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 430a409..f04a848 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -39,6 +39,7 @@
 class ComposerState;
 class DisplayState;
 struct DisplayInfo;
+struct DisplayStatInfo;
 class IDisplayEventConnection;
 class IMemoryHeap;
 class Rect;
@@ -122,6 +123,12 @@
     virtual status_t getDisplayConfigs(const sp<IBinder>& display,
             Vector<DisplayInfo>* configs) = 0;
 
+    /* returns display statistics for a given display
+     * intended to be used by the media framework to properly schedule
+     * video frames */
+    virtual status_t getDisplayStats(const sp<IBinder>& display,
+            DisplayStatInfo* stats) = 0;
+
     /* indicates which of the configurations returned by getDisplayInfo is
      * currently active */
     virtual int getActiveConfig(const sp<IBinder>& display) = 0;
@@ -177,6 +184,7 @@
         CLEAR_ANIMATION_FRAME_STATS,
         GET_ANIMATION_FRAME_STATS,
         SET_POWER_MODE,
+        GET_DISPLAY_STATS,
     };
 
     virtual status_t onTransact(uint32_t code, const Parcel& data,
diff --git a/include/ui/DisplayStatInfo.h b/include/ui/DisplayStatInfo.h
new file mode 100644
index 0000000..0549a83
--- /dev/null
+++ b/include/ui/DisplayStatInfo.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 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.
+ */
+
+#ifndef ANDROID_UI_DISPLAY_STAT_INFO_H
+#define ANDROID_UI_DISPLAY_STAT_INFO_H
+
+#include <utils/Timers.h>
+
+namespace android {
+
+struct DisplayStatInfo {
+    nsecs_t vsyncTime;
+    nsecs_t vsyncPeriod;
+};
+
+}; // namespace android
+
+#endif // ANDROID_COMPOSER_DISPLAY_STAT_INFO_H