| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 5 #include "chrome/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 URLRequestStatus::Status. | 9 // badly with URLRequestStatus::Status. |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 drag_monitor_size.SetSize(0, 0); | 807 drag_monitor_size.SetSize(0, 0); |
| 808 } | 808 } |
| 809 dragged_at_horizontal_edge_ = new_dragged_at_horizontal_edge; | 809 dragged_at_horizontal_edge_ = new_dragged_at_horizontal_edge; |
| 810 dragged_at_vertical_edge_ = new_dragged_at_vertical_edge; | 810 dragged_at_vertical_edge_ = new_dragged_at_vertical_edge; |
| 811 } | 811 } |
| 812 | 812 |
| 813 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) { | 813 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) { |
| 814 // If the GPU process is rendering directly into the View, | 814 // If the GPU process is rendering directly into the View, |
| 815 // call the compositor directly. | 815 // call the compositor directly. |
| 816 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); | 816 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); |
| 817 if (render_widget_host->is_gpu_rendering_active()) { | 817 if (render_widget_host->is_accelerated_compositing_active()) { |
| 818 host_->ScheduleComposite(); | 818 host_->ScheduleComposite(); |
| 819 return; | 819 return; |
| 820 } | 820 } |
| 821 | 821 |
| 822 GdkWindow* window = view_.get()->window; | 822 GdkWindow* window = view_.get()->window; |
| 823 DCHECK(!about_to_validate_and_paint_); | 823 DCHECK(!about_to_validate_and_paint_); |
| 824 | 824 |
| 825 invalid_rect_ = damage_rect; | 825 invalid_rect_ = damage_rect; |
| 826 about_to_validate_and_paint_ = true; | 826 about_to_validate_and_paint_ = true; |
| 827 BackingStoreX* backing_store = static_cast<BackingStoreX*>( | 827 BackingStoreX* backing_store = static_cast<BackingStoreX*>( |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 // static | 1069 // static |
| 1070 RenderWidgetHostView* | 1070 RenderWidgetHostView* |
| 1071 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1071 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
| 1072 gfx::NativeView widget) { | 1072 gfx::NativeView widget) { |
| 1073 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 1073 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
| 1074 kRenderWidgetHostViewKey); | 1074 kRenderWidgetHostViewKey); |
| 1075 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 1075 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
| 1076 } | 1076 } |
| OLD | NEW |