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

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

Issue 1546001: Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months 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
Index: chrome/browser/renderer_host/gpu_view_host.cc
===================================================================
--- chrome/browser/renderer_host/gpu_view_host.cc (revision 43024)
+++ chrome/browser/renderer_host/gpu_view_host.cc (working copy)
@@ -4,43 +4,47 @@
#include "chrome/browser/renderer_host/gpu_view_host.h"
-#include "chrome/browser/gpu_process_host.h"
+#include "chrome/browser/gpu_process_host_ui_shim.h"
#include "chrome/browser/renderer_host/backing_store_proxy.h"
#include "chrome/browser/renderer_host/video_layer_proxy.h"
#include "chrome/common/gpu_messages.h"
GpuViewHost::GpuViewHost(RenderWidgetHost* widget, GpuNativeWindowHandle parent)
: widget_(widget),
- process_(GpuProcessHost::Get()),
+ process_shim_(GpuProcessHostUIShim::Get()),
routing_id_(0) {
- if (!process_) {
+ if (!process_shim_) {
// TODO(brettw) handle error.
return;
}
- routing_id_ = process_->NewRenderWidgetHostView(parent);
+ routing_id_ = process_shim_->NewRenderWidgetHostView(parent);
}
GpuViewHost::~GpuViewHost() {
}
BackingStore* GpuViewHost::CreateBackingStore(const gfx::Size& size) {
- int32 backing_store_routing_id = process_->GetNextRoutingId();
- process_->Send(new GpuMsg_NewBackingStore(routing_id_,
- backing_store_routing_id,
- size));
- return new BackingStoreProxy(widget_, size,
- process_, backing_store_routing_id);
+ int32 backing_store_routing_id = process_shim_->GetNextRoutingId();
+ BackingStoreProxy* result =
+ new BackingStoreProxy(widget_, size,
+ process_shim_, backing_store_routing_id);
+ process_shim_->Send(new GpuMsg_NewBackingStore(routing_id_,
+ backing_store_routing_id,
+ size));
+ return result;
}
VideoLayer* GpuViewHost::CreateVideoLayer(const gfx::Size& size) {
- int32 video_layer_routing_id = process_->GetNextRoutingId();
- process_->Send(new GpuMsg_NewVideoLayer(routing_id_,
- video_layer_routing_id,
- size));
- return new VideoLayerProxy(widget_, size,
- process_, video_layer_routing_id);
+ int32 video_layer_routing_id = process_shim_->GetNextRoutingId();
+ VideoLayerProxy* result =
+ new VideoLayerProxy(widget_, size,
+ process_shim_, video_layer_routing_id);
+ process_shim_->Send(new GpuMsg_NewVideoLayer(routing_id_,
+ video_layer_routing_id,
+ size));
+ return result;
}
void GpuViewHost::OnWindowPainted() {
- process_->Send(new GpuMsg_WindowPainted(routing_id_));
+ process_shim_->Send(new GpuMsg_WindowPainted(routing_id_));
}
« no previous file with comments | « chrome/browser/renderer_host/gpu_view_host.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698