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

Unified Diff: content/renderer/gpu_channel_host.cc

Issue 6992010: Added proxy / stub pair for GPU surfaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « content/renderer/gpu_channel_host.h ('k') | content/renderer/gpu_surface_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu_channel_host.cc
===================================================================
--- content/renderer/gpu_channel_host.cc (revision 86313)
+++ content/renderer/gpu_channel_host.cc (working copy)
@@ -7,6 +7,7 @@
#include "content/common/child_process.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/renderer/command_buffer_proxy.h"
+#include "content/renderer/gpu_surface_proxy.h"
#include "content/renderer/gpu_video_service_host.h"
#include "content/renderer/render_thread.h"
#include "content/renderer/transport_texture_service.h"
@@ -186,3 +187,26 @@
delete command_buffer;
#endif
}
+
+GpuSurfaceProxy* GpuChannelHost::CreateOffscreenSurface(const gfx::Size& size) {
+#if defined(ENABLE_GPU)
+ int route_id;
+ if (!Send(new GpuChannelMsg_CreateOffscreenSurface(size, &route_id)))
+ return NULL;
+
+ scoped_ptr<GpuSurfaceProxy> surface(new GpuSurfaceProxy(this, route_id));
+ router_.AddRoute(route_id, surface.get());
+
+ return surface.release();
+#endif
+}
+
+void GpuChannelHost::DestroySurface(GpuSurfaceProxy* surface) {
+#if defined(ENABLE_GPU)
+ Send(new GpuChannelMsg_DestroySurface(surface->route_id()));
+ if (router_.ResolveRoute(surface->route_id()))
+ router_.RemoveRoute(surface->route_id());
+
+ delete surface;
+#endif
+}
« no previous file with comments | « content/renderer/gpu_channel_host.h ('k') | content/renderer/gpu_surface_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698