From 5b30c69cf29e28981f69c96296aebaf745b08e47 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 24 Aug 2012 22:33:36 -0700 Subject: Use new surface flinger API. Change-Id: I807620f965779274e36aac6729dc1e6374ff8716 --- Source/WebKit/android/WebCoreSupport/PlatformBridge.cpp | 11 +++++++++-- 1 file 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 #include #include #include @@ -124,15 +125,21 @@ String PlatformBridge::resolveFilePathForContentUri(const String& contentUri) int PlatformBridge::PlatformBridge::screenDepth() { + android::sp 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 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); } -- cgit v1.1