diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-27 17:15:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-27 17:15:50 -0700 |
commit | bb7f19e094c0208180bc6f9c1b803cd29c507c8f (patch) | |
tree | 4926e210038296a77dfc61828f14df28813b8115 | |
parent | d2b6abb0b5522a20810fde546d0167ca04c66649 (diff) | |
parent | 5b30c69cf29e28981f69c96296aebaf745b08e47 (diff) | |
download | external_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.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); } |