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

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: fix win compile 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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 const gfx::Size& size) { 1006 const gfx::Size& size) {
1006 gint depth = gdk_visual_get_depth(gtk_widget_get_visual(view_.get())); 1007 gint depth = gdk_visual_get_depth(gtk_widget_get_visual(view_.get()));
1007 return new BackingStoreGtk(host_, size, 1008 return new BackingStoreGtk(host_, size,
1008 ui::GetVisualFromGtkWidget(view_.get()), 1009 ui::GetVisualFromGtkWidget(view_.get()),
1009 depth); 1010 depth);
1010 } 1011 }
1011 1012
1012 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped( 1013 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped(
1013 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 1014 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
1014 int gpu_host_id) { 1015 int gpu_host_id) {
1015 NOTREACHED(); 1016 RenderWidgetHost::AcknowledgeSwapBuffers(params.route_id, gpu_host_id);
1016 } 1017 }
1017 1018
1018 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( 1019 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer(
1019 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 1020 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
1020 int gpu_host_id) { 1021 int gpu_host_id) {
1021 NOTREACHED(); 1022 RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id);
1022 } 1023 }
1023 1024
1024 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { 1025 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) {
1025 RenderWidgetHostView::SetBackground(background); 1026 RenderWidgetHostView::SetBackground(background);
1026 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); 1027 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background));
1027 } 1028 }
1028 1029
1029 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( 1030 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging(
1030 GtkWidget* widget, GdkEventMotion* event) { 1031 GtkWidget* widget, GdkEventMotion* event) {
1031 // If the widget is aligned with an edge of the monitor its on and the user 1032 // If the widget is aligned with an edge of the monitor its on and the user
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 } 1435 }
1435 } 1436 }
1436 1437
1437 // static 1438 // static
1438 void RenderWidgetHostView::GetDefaultScreenInfo( 1439 void RenderWidgetHostView::GetDefaultScreenInfo(
1439 WebKit::WebScreenInfo* results) { 1440 WebKit::WebScreenInfo* results) {
1440 GdkWindow* gdk_window = 1441 GdkWindow* gdk_window =
1441 gdk_display_get_default_group(gdk_display_get_default()); 1442 gdk_display_get_default_group(gdk_display_get_default());
1442 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1443 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1443 } 1444 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698