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

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

Issue 4815001: Use inner HWND for accelerated rendering on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 drag_monitor_size.SetSize(0, 0); 803 drag_monitor_size.SetSize(0, 0);
804 } 804 }
805 dragged_at_horizontal_edge_ = new_dragged_at_horizontal_edge; 805 dragged_at_horizontal_edge_ = new_dragged_at_horizontal_edge;
806 dragged_at_vertical_edge_ = new_dragged_at_vertical_edge; 806 dragged_at_vertical_edge_ = new_dragged_at_vertical_edge;
807 } 807 }
808 808
809 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) { 809 void RenderWidgetHostViewGtk::Paint(const gfx::Rect& damage_rect) {
810 // If the GPU process is rendering directly into the View, 810 // If the GPU process is rendering directly into the View,
811 // call the compositor directly. 811 // call the compositor directly.
812 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); 812 RenderWidgetHost* render_widget_host = GetRenderWidgetHost();
813 if (render_widget_host->is_gpu_rendering_active()) { 813 if (render_widget_host->is_accelerated_compositing_active()) {
814 host_->ScheduleComposite(); 814 host_->ScheduleComposite();
815 return; 815 return;
816 } 816 }
817 817
818 GdkWindow* window = view_.get()->window; 818 GdkWindow* window = view_.get()->window;
819 DCHECK(!about_to_validate_and_paint_); 819 DCHECK(!about_to_validate_and_paint_);
820 820
821 invalid_rect_ = damage_rect; 821 invalid_rect_ = damage_rect;
822 about_to_validate_and_paint_ = true; 822 about_to_validate_and_paint_ = true;
823 BackingStoreX* backing_store = static_cast<BackingStoreX*>( 823 BackingStoreX* backing_store = static_cast<BackingStoreX*>(
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1062 }
1063 1063
1064 // static 1064 // static
1065 RenderWidgetHostView* 1065 RenderWidgetHostView*
1066 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1066 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1067 gfx::NativeView widget) { 1067 gfx::NativeView widget) {
1068 gpointer user_data = g_object_get_data(G_OBJECT(widget), 1068 gpointer user_data = g_object_get_data(G_OBJECT(widget),
1069 kRenderWidgetHostViewKey); 1069 kRenderWidgetHostViewKey);
1070 return reinterpret_cast<RenderWidgetHostView*>(user_data); 1070 return reinterpret_cast<RenderWidgetHostView*>(user_data);
1071 } 1071 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698