Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 8498036: Delay UpdateRect until the SwapBuffers callback when accelerated compositing is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: allow multiple update messages in flight Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 // If this gets included after the gtk headers, then a bunch of compiler 7 // If this gets included after the gtk headers, then a bunch of compiler
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts
9 // badly with net::URLRequestStatus::Status. 9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 13 matching lines...) Expand all
24 #include "base/metrics/histogram.h" 24 #include "base/metrics/histogram.h"
25 #include "base/string_number_conversions.h" 25 #include "base/string_number_conversions.h"
26 #include "base/time.h" 26 #include "base/time.h"
27 #include "base/utf_string_conversions.h" 27 #include "base/utf_string_conversions.h"
28 #include "content/browser/renderer_host/backing_store_gtk.h" 28 #include "content/browser/renderer_host/backing_store_gtk.h"
29 #include "content/browser/renderer_host/gtk_im_context_wrapper.h" 29 #include "content/browser/renderer_host/gtk_im_context_wrapper.h"
30 #include "content/browser/renderer_host/gtk_window_utils.h" 30 #include "content/browser/renderer_host/gtk_window_utils.h"
31 #include "content/browser/renderer_host/render_view_host.h" 31 #include "content/browser/renderer_host/render_view_host.h"
32 #include "content/browser/renderer_host/render_view_host_delegate.h" 32 #include "content/browser/renderer_host/render_view_host_delegate.h"
33 #include "content/browser/renderer_host/render_widget_host.h" 33 #include "content/browser/renderer_host/render_widget_host.h"
34 #include "content/common/gpu/gpu_messages.h"
34 #include "content/public/browser/native_web_keyboard_event.h" 35 #include "content/public/browser/native_web_keyboard_event.h"
35 #include "content/public/common/content_switches.h" 36 #include "content/public/common/content_switches.h"
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h"
40 #include "ui/base/gtk/gtk_compat.h" 41 #include "ui/base/gtk/gtk_compat.h"
41 #include "ui/base/text/text_elider.h" 42 #include "ui/base/text/text_elider.h"
42 #include "ui/base/x/x11_util.h" 43 #include "ui/base/x/x11_util.h"
43 #include "ui/gfx/gtk_native_view_id_manager.h" 44 #include "ui/gfx/gtk_native_view_id_manager.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 const gfx::Size& size) { 999 const gfx::Size& size) {
999 gint depth = gdk_visual_get_depth(gtk_widget_get_visual(view_.get())); 1000 gint depth = gdk_visual_get_depth(gtk_widget_get_visual(view_.get()));
1000 return new BackingStoreGtk(host_, size, 1001 return new BackingStoreGtk(host_, size,
1001 ui::GetVisualFromGtkWidget(view_.get()), 1002 ui::GetVisualFromGtkWidget(view_.get()),
1002 depth); 1003 depth);
1003 } 1004 }
1004 1005
1005 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped( 1006 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped(
1006 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 1007 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
1007 int gpu_host_id) { 1008 int gpu_host_id) {
1008 NOTREACHED(); 1009 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id);
1009 } 1010 }
1010 1011
1011 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( 1012 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer(
1012 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 1013 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
1013 int gpu_host_id) { 1014 int gpu_host_id) {
1014 NOTREACHED(); 1015 RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id);
1015 } 1016 }
1016 1017
1017 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { 1018 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) {
1018 RenderWidgetHostView::SetBackground(background); 1019 RenderWidgetHostView::SetBackground(background);
1019 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); 1020 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background));
1020 } 1021 }
1021 1022
1022 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( 1023 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging(
1023 GtkWidget* widget, GdkEventMotion* event) { 1024 GtkWidget* widget, GdkEventMotion* event) {
1024 // If the widget is aligned with an edge of the monitor its on and the user 1025 // If the widget is aligned with an edge of the monitor its on and the user
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 } 1359 }
1359 } 1360 }
1360 1361
1361 // static 1362 // static
1362 void RenderWidgetHostView::GetDefaultScreenInfo( 1363 void RenderWidgetHostView::GetDefaultScreenInfo(
1363 WebKit::WebScreenInfo* results) { 1364 WebKit::WebScreenInfo* results) {
1364 GdkWindow* gdk_window = 1365 GdkWindow* gdk_window =
1365 gdk_display_get_default_group(gdk_display_get_default()); 1366 gdk_display_get_default_group(gdk_display_get_default());
1366 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1367 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1367 } 1368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698