summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-08-24 22:33:36 -0700
committerJeff Brown <jeffbrown@google.com>2012-08-24 22:42:50 -0700
commit5b30c69cf29e28981f69c96296aebaf745b08e47 (patch)
tree67ba183c630171a6f982206f1428144e1aae7526 /Source/WebKit
parent19756ca1956aa2f3a4c7ef5095cb95a3010338ac (diff)
downloadexternal_webkit-5b30c69cf29e28981f69c96296aebaf745b08e47.zip
external_webkit-5b30c69cf29e28981f69c96296aebaf745b08e47.tar.gz
external_webkit-5b30c69cf29e28981f69c96296aebaf745b08e47.tar.bz2
Use new surface flinger API.
Change-Id: I807620f965779274e36aac6729dc1e6374ff8716
Diffstat (limited to 'Source/WebKit')
-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);
}