summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-08-27 17:15:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-27 17:15:50 -0700
commitbb7f19e094c0208180bc6f9c1b803cd29c507c8f (patch)
tree4926e210038296a77dfc61828f14df28813b8115
parentd2b6abb0b5522a20810fde546d0167ca04c66649 (diff)
parent5b30c69cf29e28981f69c96296aebaf745b08e47 (diff)
downloadexternal_webkit-bb7f19e094c0208180bc6f9c1b803cd29c507c8f.zip
external_webkit-bb7f19e094c0208180bc6f9c1b803cd29c507c8f.tar.gz
external_webkit-bb7f19e094c0208180bc6f9c1b803cd29c507c8f.tar.bz2
Merge "Use new surface flinger API." into jb-mr1-dev
-rw-r--r--Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index 864b27d..6e39c33 100644
--- a/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -43,6 +43,7 @@
#include "WebViewCore.h"
#include "npruntime.h"
+#include <gui/ISurfaceComposer.h>
#include <gui/SurfaceComposerClient.h>
#include <ui/DisplayInfo.h>
#include <ui/PixelFormat.h>
@@ -124,15 +125,21 @@ String PlatformBridge::resolveFilePathForContentUri(const String& contentUri)
int PlatformBridge::PlatformBridge::screenDepth()
{
+ android::sp<android::IBinder> display(
+ android::SurfaceComposerClient::getBuiltInDisplay(
+ android::ISurfaceComposer::eDisplayIdMain));
android::DisplayInfo info;
- android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
+ android::SurfaceComposerClient::getDisplayInfo(display, &info);
return info.pixelFormatInfo.bitsPerPixel;
}
FloatRect PlatformBridge::screenRect()
{
+ android::sp<android::IBinder> display(
+ android::SurfaceComposerClient::getBuiltInDisplay(
+ android::ISurfaceComposer::eDisplayIdMain));
android::DisplayInfo info;
- android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
+ android::SurfaceComposerClient::getDisplayInfo(display, &info);
return FloatRect(0.0, 0.0, info.w, info.h);
}