diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-24 22:33:36 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-08-24 22:42:50 -0700 |
commit | 5b30c69cf29e28981f69c96296aebaf745b08e47 (patch) | |
tree | 67ba183c630171a6f982206f1428144e1aae7526 /Source/WebKit | |
parent | 19756ca1956aa2f3a4c7ef5095cb95a3010338ac (diff) | |
download | external_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.cpp | 11 |
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); } |