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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 8595002: Get rid of gpu_messages.h include in chrome by having the RenderWidgetHostView implementation ask... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix aura/views build Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_views.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_views.cc (revision 110645)
+++ chrome/browser/renderer_host/render_widget_host_view_views.cc (working copy)
@@ -38,10 +38,7 @@
#include "views/widget/widget.h"
#if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
-#include "base/bind.h"
-#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/renderer_host/accelerated_surface_container_linux.h"
-#include "content/common/gpu/gpu_messages.h"
#include "ui/gfx/gl/gl_bindings.h"
#endif
@@ -99,15 +96,6 @@
wmevent->globalY = wmevent->y + origin.y();
}
-#if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
-void AcknowledgeSwapBuffers(int32 route_id, int gpu_host_id) {
- // It's possible that gpu_host_id is no longer valid at this point (like if
- // gpu process was restarted after a crash). SendToGpuHost handles this.
- GpuProcessHostUIShim::SendToGpuHost(gpu_host_id,
- new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id));
-}
-#endif
-
} // namespace
RenderWidgetHostViewViews::RenderWidgetHostViewViews(RenderWidgetHost* host)
@@ -1151,12 +1139,14 @@
glFlush();
if (!GetWidget() || !GetWidget()->GetCompositor()) {
- // We have no compositor, so we have no way to display the surface
- AcknowledgeSwapBuffers(route_id, gpu_host_id); // Must still send the ACK
+ // We have no compositor, so we have no way to display the surface.
+ // Must still send the ACK.
+ host_->AcknowledgeSwapBuffers(route_id, gpu_host_id);
} else {
// Add sending an ACK to the list of things to do OnCompositingEnded
on_compositing_ended_callbacks_.push_back(
- base::Bind(AcknowledgeSwapBuffers, route_id, gpu_host_id));
+ base::Bind(&RenderWidgetHost::AcknowledgeSwapBuffers,
+ base::Unretained(host_), route_id, gpu_host_id));
ui::Compositor *compositor = GetWidget()->GetCompositor();
if (!compositor->HasObserver(this))
compositor->AddObserver(this);
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698