1 From e0a14f54cc9874faa19b1fbe930e2c40ee044055 Mon Sep 17 00:00:00 2001
2 From: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
3 Date: Tue, 10 Sep 2013 13:30:41 +0300
4 Subject: [PATCH 32/33] Obviate device scale factor problem.
7 content/browser/renderer_host/window_utils_efl.cc | 33 +++--------------------
8 1 file changed, 3 insertions(+), 30 deletions(-)
10 diff --git a/content/browser/renderer_host/window_utils_efl.cc b/content/browser/renderer_host/window_utils_efl.cc
11 index 2834d59..95caa4e 100644
12 --- a/content/browser/renderer_host/window_utils_efl.cc
13 +++ b/content/browser/renderer_host/window_utils_efl.cc
16 #include "ui/gfx/rect.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
18 +#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h"
26 -// Length of an inch in CSS's 1px unit.
27 -const int kPixelsPerInch = 96;
29 -int depthPerComponent(int depth) {
44 void GetScreenInfoEfl(WebKit::WebScreenInfo* results) {
45 Ecore_X_Display* display = ecore_x_display_get();
46 Ecore_X_Screen* screen = ecore_x_default_screen_get();
48 - ecore_x_screen_size_get(screen, &width, &height);
49 - int depth = ecore_x_default_depth_get(display, screen);
50 - results->deviceScaleFactor = ecore_x_dpi_get() / kPixelsPerInch;
51 - results->isMonochrome = depth == 1;
52 - results->depth = depth;
53 - results->depthPerComponent = depthPerComponent(depth);
54 - // FIXME: not sure how to get available rect.
55 - results->rect = WebKit::WebRect(0, 0, width, height);
56 - results->availableRect = results->rect;
57 + *results = WebKit::WebScreenInfoFactory::screenInfo(
58 + reinterpret_cast<Display*>(display), ecore_x_screen_index_get(screen));
61 } // namespace content