[meego-commits] 23625: Changes to devel:tv:1.2/meego-tv-browser

Shouqun Liu no_reply at build.meego.com
Fri Aug 12 03:12:32 UTC 2011


Hi,
I have made the following changes to meego-tv-browser in project devel:tv:1.2. Please review and accept ASAP.

Thank You,
Shouqun Liu

[This message was auto-generated]

---

Request #23625:

  submit:   home:liushouqun:branches:devel:tv:1.2/meego-tv-browser(r2)(cleanup) -> devel:tv:1.2/meego-tv-browser


Message:
    * Fri Aug 12 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
- [BMC 22629] Meego-tv-browser should enable windowed mode flash plugin
  Enable windowed mode flash plugin support for meego-tv-browser. 
  Add an environment variable to control whether the browser force windowless mode plugin
  Set "FORCE_WINDOWLESS_PLUGIN" variable to force windowless plugin by "export FORCE_WINDOWLESS_PLUGIN"
  beforce launch the meego-tv-browser. 
  By default, the browser running plugin in windowed mode. 

-This line, and those below, will be ignored--

old: devel:tv:1.2/meego-tv-browser
new: home:liushouqun:branches:devel:tv:1.2/meego-tv-browserIndex: chromium-qt.patch
===================================================================
--- chromium-qt.patch (revision 7)
+++ chromium-qt.patch (revision 2)
@@ -108,6 +108,19 @@
 +#define DNOTIMPLEMENTED() DLOG(ERROR) << NOTIMPLEMENTED_MSG
 +
  #endif  // BASE_LOGGING_H_
+diff --git a/base/meegotouch_config.h b/base/meegotouch_config.h
+new file mode 100644
+index 0000000..131ad01
+--- /dev/null
++++ b/base/meegotouch_config.h
+@@ -0,0 +1,7 @@
++#ifndef _BASE_MEEGOTOUCH_CONFIG_H
++#define _BASE_MEEGOTOUCH_CONFIG_H
++
++#define MEEGO_ENABLE_WINDOWED_PLUGIN 1
++
++#endif
++
 diff --git a/base/message_loop.cc b/base/message_loop.cc
 index 85e37d4..861c537 100644
 --- a/base/message_loop.cc
@@ -797,7 +810,7 @@
 +  _exit(return_code);
 +}
 diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
-index ec77bc3..569cf6b 100644
+index ec77bc3..4a0f528 100644
 --- a/chrome/app/chrome_main.cc
 +++ b/chrome/app/chrome_main.cc
 @@ -4,6 +4,20 @@
@@ -837,7 +850,7 @@
  #if defined(USE_X11)
  #include <gdk/gdk.h>
  #include <glib.h>
-@@ -117,6 +133,108 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
+@@ -117,6 +133,124 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
  extern "C" {
  __attribute__((visibility("default")))
  int ChromeMain(int argc, char** argv);
@@ -879,7 +892,8 @@
 +  int height = 720;  //\/FIXME  for TV, the resolution is 720p by default (1280x720)
 +  QString cmd;
 +  QString cdata;
-+
++  bool raster = true;
++  bool background = false;
 +  for (int i=1; i<argc; i++)
 +  {
 +    QString s(argv[i]);
@@ -907,6 +921,19 @@
 +    {
 +      height = atoi (argv[++i]);
 +    }
++    else if (s == "--no-raster")
++    {
++      raster = false;
++    }
++    else if (s == "--background")
++    { 
++      background = true;
++    }
++  }
++ 
++  if (raster) { 
++    DLOG(INFO)<<"Enable Raster Painting Engine";
++    QApplication::setGraphicsSystem("raster");
 +  }
 +
 +  g_launcher_app = new LauncherApp(argc, argv);
@@ -914,8 +941,10 @@
 +  g_launcher_app->dbusInit(argc, argv);
 +
 +  initAtoms ();
-+
-+  g_main_window = new LauncherWindow(fullscreen, width, height, opengl, setSource);
++  if (background) {
++    DLOG(INFO)<< "Starting Browser in Background";
++  }
++  g_main_window = new LauncherWindow(fullscreen, width, height, opengl, setSource, background);
 +
 +  //show main window to improve startup time
 +  //g_main_window->show();
@@ -946,7 +975,7 @@
  }
  #endif
  
-@@ -182,6 +300,8 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
+@@ -182,6 +316,8 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
      // When debugging, these process types can end up being run directly.
      return;
    } else {
@@ -955,7 +984,7 @@
      NOTREACHED() << "Unknown process type";
    }
    if (score > -1)
-@@ -780,6 +900,10 @@ int ChromeMain(int argc, char** argv) {
+@@ -780,6 +916,10 @@ int ChromeMain(int argc, char** argv) {
    // as our process name since we exec() via that to be update-safe.
  #endif
  
@@ -966,7 +995,7 @@
  #if defined(OS_POSIX)
    SetProcessTitleFromCommandLine(argv);
  #endif
-@@ -793,5 +917,9 @@ int ChromeMain(int argc, char** argv) {
+@@ -793,5 +933,9 @@ int ChromeMain(int argc, char** argv) {
  
    chrome_main::LowLevelShutdown();
  
@@ -1033,6 +1062,303 @@
        </message>
        <!-- Try Chrome Toast Dialog -->
        <message name="IDS_TRY_TOAST_HEADING" desc="Top line of the try-chrome-again dialog">
+diff --git a/chrome/app/fast-startup/README b/chrome/app/fast-startup/README
+new file mode 100644
+index 0000000..04b1209
+--- /dev/null
++++ b/chrome/app/fast-startup/README
+@@ -0,0 +1,4 @@
++cp browserd /usr/bin/
++cp browserd.desktop /etc/xdg/autostart/
++cp meego-browser /usr/bin/
++cp meego-tv-browser /usr/bin/
+diff --git a/chrome/app/fast-startup/browserd b/chrome/app/fast-startup/browserd
+new file mode 100755
+index 0000000..9ffadfd
+--- /dev/null
++++ b/chrome/app/fast-startup/browserd
+@@ -0,0 +1,35 @@
++#!/bin/bash
++if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
++      ## if not found, launch a new one
++  echo "DBUS_SESSION_BUS_ADDRESS Has NOT been set"
++      eval `dbus-launch --sh-syntax --exit-with-session`
++      echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
++      echo "$DBUS_SESSION_BUS_ADDRESS" > ~/.dbus/browser_session
++else
++  echo "DBUS_SESSION_BUS_ADDRESS Has been set"
++fi
++
++#First start up delay 10 seconds to give main UI more system resource
++sleep 10
++ps aux |grep meego-browser |grep -v grep
++if [ $? -ne 0 ]
++then
++  echo "Starting a MeeGo TV Browser in Background"
++  meego-browser --background
++else
++  echo "Already Started"
++fi
++
++
++while [ 1 -eq 1 ]
++do
++  sleep 5
++  ps aux |grep meego-browser |grep -v grep
++  if [ $? -ne 0 ]
++  then
++   echo "Starting a MeeGo TV Browser in Background"
++   meego-browser --background
++  else
++   echo "Already Started"
++  fi
++done
+diff --git a/chrome/app/fast-startup/browserd.desktop b/chrome/app/fast-startup/browserd.desktop
+new file mode 100644
+index 0000000..bc66d7c
+--- /dev/null
++++ b/chrome/app/fast-startup/browserd.desktop
+@@ -0,0 +1,9 @@
++[Desktop Entry]
++Version=1.0
++Name=browserd
++GenericName=MeeGo TV Browser Daemon
++Comment=Start Browser in Background
++Exec="browserd"
++Terminal=false
++Type=Application
++Categories=TV;Browser
+diff --git a/chrome/app/fast-startup/meego-browser b/chrome/app/fast-startup/meego-browser
+new file mode 100755
+index 0000000..a600e15
+--- /dev/null
++++ b/chrome/app/fast-startup/meego-browser
+@@ -0,0 +1,149 @@
++#!/bin/sh
++
++# Chromium launcher
++
++# Authors:
++#  Fabien Tassin <fta at sofaraway.org>
++# License: GPLv2 or later
++
++APPNAME=meego-browser
++LIBDIR=/usr/lib/meego-tv-browser
++GDB=/usr/bin/gdb
++
++# Let the Chromium aware MeeGo desktop environment.
++# For system proxy setting integration.
(6564 more lines skipped)
Index: meego-tv-browser.sh
===================================================================
--- meego-tv-browser.sh (revision 7)
+++ meego-tv-browser.sh (revision 2)
@@ -145,5 +145,5 @@
   $GDB "$LIBDIR/$APPNAME" -x $tmpfile
   exit $?
 else
-  exec $LIBDIR/$APPNAME "--fullscreen" "--disable-accelerated-compositing" "--tabs-limit=8" "--opengl" "$@"
+  exec $LIBDIR/$APPNAME "--fullscreen" "--disable-accelerated-compositing" "--tabs-limit=8" "--opengl" "--no-raster" "$@"
 fi
Index: meego-tv-browser.changes
===================================================================
--- meego-tv-browser.changes (revision 7)
+++ meego-tv-browser.changes (revision 2)
@@ -1,3 +1,17 @@
+* Fri Aug 12 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
+- [BMC 22629] Meego-tv-browser should enable windowed mode flash plugin
+  Enable windowed mode flash plugin support for meego-tv-browser. 
+  Add an environment variable to control whether the browser force windowless mode plugin
+  Set "FORCE_WINDOWLESS_PLUGIN" variable to force windowless plugin by "export FORCE_WINDOWLESS_PLUGIN"
+  beforce launch the meego-tv-browser. 
+  By default, the browser running plugin in windowed mode. 
+
+* Wed Jul 13 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
+- [BMC 21043] Meego-tv-browser need to enable raster painting engine 
+  With the "raster" painting engine and disable "opengl", the SunSpider result can improve greatly
+  In this fix, "raster" is enabled by default, and to disable raster use "--no-raster" option
+  "opengl" is disabled, if need to enable opengl, use the "--opengl" option
+
 * Thu Jun 09 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
 - [BMC 18821] meego-tv-browser drop down lists are not displayed and some icon not displayed
   Fix the browser to draw the drop down popup menus with WebKit directly, instead of using 
Index: meego-tv-browser.spec
===================================================================
--- meego-tv-browser.spec (revision 7)
+++ meego-tv-browser.spec (revision 2)
@@ -22,12 +22,12 @@
 Source4:        meego-browser-ffmpeg.tar.bz2
 Source5:        meego-tv-browser.ts
 
-# 12.0.712.0-rebase branch 16e43edc265780a01d2b94cba1aefcdad63661bd 661c8e0b7c036640f7924805cc06dcaf4d4f0232
+# 12.0.712.0-rebase branch 16e43edc265780a01d2b94cba1aefcdad63661bd 22bf1096c299811ef32b8a07c0919a1c83d454ec
 Patch0:         chromium-qt.patch
 # 12.0.712.0-rebase branch 34c329a724377cbd4d2d887bf9e7b82b4eaa2a41 03de7ac45fc065d8e2b5334a09b936437ebce681
 Patch1:         webkit.patch
 
-Provides:       chromium-based-browser
+Provides:       chromium-based-tv-browser
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  %{ix86} arm x86_64

State:   new          2011-08-11T20:12:21 liushouqun
Comment: None



changes files:
--------------
--- meego-tv-browser.changes
+++ meego-tv-browser.changes
@@ -0,0 +1,14 @@
+* Fri Aug 12 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
+- [BMC 22629] Meego-tv-browser should enable windowed mode flash plugin
+  Enable windowed mode flash plugin support for meego-tv-browser. 
+  Add an environment variable to control whether the browser force windowless mode plugin
+  Set "FORCE_WINDOWLESS_PLUGIN" variable to force windowless plugin by "export FORCE_WINDOWLESS_PLUGIN"
+  beforce launch the meego-tv-browser. 
+  By default, the browser running plugin in windowed mode. 
+
+* Wed Jul 13 2011 Shouqun Liu <shouqun.liu at intel.com> - 12.0.712.0
+- [BMC 21043] Meego-tv-browser need to enable raster painting engine 
+  With the "raster" painting engine and disable "opengl", the SunSpider result can improve greatly
+  In this fix, "raster" is enabled by default, and to disable raster use "--no-raster" option
+  "opengl" is disabled, if need to enable opengl, use the "--opengl" option
+

spec files:
-----------
--- meego-tv-browser.spec
+++ meego-tv-browser.spec
@@ -22,12 +22,12 @@
 Source4:        meego-browser-ffmpeg.tar.bz2
 Source5:        meego-tv-browser.ts
 
-# 12.0.712.0-rebase branch 16e43edc265780a01d2b94cba1aefcdad63661bd 661c8e0b7c036640f7924805cc06dcaf4d4f0232
+# 12.0.712.0-rebase branch 16e43edc265780a01d2b94cba1aefcdad63661bd 22bf1096c299811ef32b8a07c0919a1c83d454ec
 Patch0:         chromium-qt.patch
 # 12.0.712.0-rebase branch 34c329a724377cbd4d2d887bf9e7b82b4eaa2a41 03de7ac45fc065d8e2b5334a09b936437ebce681
 Patch1:         webkit.patch
 
-Provides:       chromium-based-browser
+Provides:       chromium-based-tv-browser
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  %{ix86} arm x86_64
 

other changes:
--------------

++++++ chromium-qt.patch
--- chromium-qt.patch
+++ chromium-qt.patch
@@ -108,6 +108,19 @@
 +#define DNOTIMPLEMENTED() DLOG(ERROR) << NOTIMPLEMENTED_MSG
 +
  #endif  // BASE_LOGGING_H_
+diff --git a/base/meegotouch_config.h b/base/meegotouch_config.h
+new file mode 100644
+index 0000000..131ad01
+--- /dev/null
++++ b/base/meegotouch_config.h
+@@ -0,0 +1,7 @@
++#ifndef _BASE_MEEGOTOUCH_CONFIG_H
++#define _BASE_MEEGOTOUCH_CONFIG_H
++
++#define MEEGO_ENABLE_WINDOWED_PLUGIN 1
++
++#endif
++
 diff --git a/base/message_loop.cc b/base/message_loop.cc
 index 85e37d4..861c537 100644
 --- a/base/message_loop.cc
@@ -797,7 +810,7 @@
 +  _exit(return_code);
 +}
 diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
-index ec77bc3..569cf6b 100644
+index ec77bc3..4a0f528 100644
 --- a/chrome/app/chrome_main.cc
 +++ b/chrome/app/chrome_main.cc
 @@ -4,6 +4,20 @@
@@ -837,7 +850,7 @@
  #if defined(USE_X11)
  #include <gdk/gdk.h>
  #include <glib.h>
-@@ -117,6 +133,108 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
+@@ -117,6 +133,124 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
  extern "C" {
  __attribute__((visibility("default")))
  int ChromeMain(int argc, char** argv);
@@ -879,7 +892,8 @@
 +  int height = 720;  //\/FIXME  for TV, the resolution is 720p by default (1280x720)
 +  QString cmd;
 +  QString cdata;
-+
++  bool raster = true;
++  bool background = false;
 +  for (int i=1; i<argc; i++)
 +  {
 +    QString s(argv[i]);
@@ -907,6 +921,19 @@
 +    {
 +      height = atoi (argv[++i]);
 +    }
++    else if (s == "--no-raster")
++    {
++      raster = false;
++    }
++    else if (s == "--background")
++    { 
++      background = true;
++    }
++  }
++ 
++  if (raster) { 
++    DLOG(INFO)<<"Enable Raster Painting Engine";
++    QApplication::setGraphicsSystem("raster");
 +  }
 +
 +  g_launcher_app = new LauncherApp(argc, argv);
@@ -914,8 +941,10 @@
 +  g_launcher_app->dbusInit(argc, argv);
 +
 +  initAtoms ();
-+
-+  g_main_window = new LauncherWindow(fullscreen, width, height, opengl, setSource);
++  if (background) {
++    DLOG(INFO)<< "Starting Browser in Background";
++  }
++  g_main_window = new LauncherWindow(fullscreen, width, height, opengl, setSource, background);
 +
 +  //show main window to improve startup time
 +  //g_main_window->show();
@@ -946,7 +975,7 @@
  }
  #endif
  
-@@ -182,6 +300,8 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
+@@ -182,6 +316,8 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
      // When debugging, these process types can end up being run directly.
      return;
    } else {
@@ -955,7 +984,7 @@
      NOTREACHED() << "Unknown process type";
    }
    if (score > -1)
-@@ -780,6 +900,10 @@ int ChromeMain(int argc, char** argv) {
+@@ -780,6 +916,10 @@ int ChromeMain(int argc, char** argv) {
    // as our process name since we exec() via that to be update-safe.
  #endif
  
@@ -966,7 +995,7 @@
  #if defined(OS_POSIX)
    SetProcessTitleFromCommandLine(argv);
  #endif
-@@ -793,5 +917,9 @@ int ChromeMain(int argc, char** argv) {
+@@ -793,5 +933,9 @@ int ChromeMain(int argc, char** argv) {
  
    chrome_main::LowLevelShutdown();
  
@@ -1033,6 +1062,303 @@
        </message>
        <!-- Try Chrome Toast Dialog -->
        <message name="IDS_TRY_TOAST_HEADING" desc="Top line of the try-chrome-again dialog">
+diff --git a/chrome/app/fast-startup/README b/chrome/app/fast-startup/README
+new file mode 100644
+index 0000000..04b1209
+--- /dev/null
++++ b/chrome/app/fast-startup/README
+@@ -0,0 +1,4 @@
++cp browserd /usr/bin/
++cp browserd.desktop /etc/xdg/autostart/
++cp meego-browser /usr/bin/
++cp meego-tv-browser /usr/bin/
+diff --git a/chrome/app/fast-startup/browserd b/chrome/app/fast-startup/browserd
+new file mode 100755
+index 0000000..9ffadfd
+--- /dev/null
++++ b/chrome/app/fast-startup/browserd
+@@ -0,0 +1,35 @@
++#!/bin/bash
++if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
++      ## if not found, launch a new one
++  echo "DBUS_SESSION_BUS_ADDRESS Has NOT been set"
++      eval `dbus-launch --sh-syntax --exit-with-session`
++      echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
++      echo "$DBUS_SESSION_BUS_ADDRESS" > ~/.dbus/browser_session
++else
++  echo "DBUS_SESSION_BUS_ADDRESS Has been set"
++fi
++
++#First start up delay 10 seconds to give main UI more system resource
++sleep 10
++ps aux |grep meego-browser |grep -v grep
++if [ $? -ne 0 ]
++then
++  echo "Starting a MeeGo TV Browser in Background"
++  meego-browser --background
++else
++  echo "Already Started"
++fi
++
++
++while [ 1 -eq 1 ]
++do
++  sleep 5
++  ps aux |grep meego-browser |grep -v grep
++  if [ $? -ne 0 ]
++  then
++   echo "Starting a MeeGo TV Browser in Background"
++   meego-browser --background
++  else
++   echo "Already Started"
++  fi
++done
+diff --git a/chrome/app/fast-startup/browserd.desktop b/chrome/app/fast-startup/browserd.desktop
+new file mode 100644
+index 0000000..bc66d7c
+--- /dev/null
++++ b/chrome/app/fast-startup/browserd.desktop
+@@ -0,0 +1,9 @@
++[Desktop Entry]
++Version=1.0
++Name=browserd
++GenericName=MeeGo TV Browser Daemon
++Comment=Start Browser in Background
++Exec="browserd"
++Terminal=false
++Type=Application
++Categories=TV;Browser
+diff --git a/chrome/app/fast-startup/meego-browser b/chrome/app/fast-startup/meego-browser
+new file mode 100755
+index 0000000..a600e15
+--- /dev/null
++++ b/chrome/app/fast-startup/meego-browser
+@@ -0,0 +1,149 @@
++#!/bin/sh
++
++# Chromium launcher
++
++# Authors:
++#  Fabien Tassin <fta at sofaraway.org>
++# License: GPLv2 or later
++
++APPNAME=meego-browser
++LIBDIR=/usr/lib/meego-tv-browser
++GDB=/usr/bin/gdb
++
++# Let the Chromium aware MeeGo desktop environment.
++# For system proxy setting integration.
(6564 more lines skipped)

++++++ meego-tv-browser.sh
--- meego-tv-browser.sh
+++ meego-tv-browser.sh
@@ -145,5 +145,5 @@
   $GDB "$LIBDIR/$APPNAME" -x $tmpfile
   exit $?
 else
-  exec $LIBDIR/$APPNAME "--fullscreen" "--disable-accelerated-compositing" "--tabs-limit=8" "--opengl" "$@"
+  exec $LIBDIR/$APPNAME "--fullscreen" "--disable-accelerated-compositing" "--tabs-limit=8" "--opengl" "--no-raster" "$@"
 fi



More information about the MeeGo-commits mailing list