summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu_process_host.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 19:22:44 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 19:22:44 +0000
commita89a7314517eda116348ae314289cde228fc637b (patch)
treea0247c61a7236df87b7f14ee48160dcf8e4cec2b /chrome/browser/gpu_process_host.cc
parent34c190328b287081617fc0f36592ac4a45c2a213 (diff)
downloadchromium_src-a89a7314517eda116348ae314289cde228fc637b.zip
chromium_src-a89a7314517eda116348ae314289cde228fc637b.tar.gz
chromium_src-a89a7314517eda116348ae314289cde228fc637b.tar.bz2
Alternative to overlays on X windows.
Created a new GTK widget that gives us more control over when X windows (associated with GL contexts) are created and destroyed. This achieves the same thing as the overlay code (now reverted). It fixes two regressions with the overlay code: - maps.google.com and html5test.com now work (switching between software and hardware rendering) - expose events now get through in accelerated mode BUG=58862,59887 TEST=Go to html5test.com. Should switch contents to show results. Disable compositing window manager. Go to http://peter.sh/2010/06/chromium-now-features-gpu-acceleration-and-css-3d-transforms/. Adjust the rotate z slider to enable accelerated compositing. Drag a different window over top. Redraws should happen. Review URL: http://codereview.chromium.org/3973009 Patch from Jonathan Backer <backer@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gpu_process_host.cc')
-rw-r--r--chrome/browser/gpu_process_host.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index a33ef5c..be62820 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -23,6 +23,7 @@
#include "media/base/media_switches.h"
#if defined(OS_LINUX)
+#include "app/x11_util.h"
#include "gfx/gtk_native_view_id_manager.h"
#endif
@@ -237,7 +238,7 @@ void SendDelayedReply(IPC::Message* reply_msg) {
}
void GetViewXIDDispatcher(gfx::NativeViewId id, IPC::Message* reply_msg) {
- unsigned long xid;
+ XID xid;
GtkNativeViewManager* manager = Singleton<GtkNativeViewManager>::get();
if (!manager->GetPermanentXIDForId(&xid, id)) {
@@ -253,11 +254,11 @@ void GetViewXIDDispatcher(gfx::NativeViewId id, IPC::Message* reply_msg) {
NewRunnableFunction(&SendDelayedReply, reply_msg));
}
-}
+} // namespace
void GpuProcessHost::OnGetViewXID(gfx::NativeViewId id,
IPC::Message *reply_msg) {
- // Have to request a permanent overlay from UI thread.
+ // Have to request a permanent XID from UI thread.
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&GetViewXIDDispatcher, id, reply_msg));