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

Unified Diff: content/renderer/browser_plugin/old/browser_plugin.cc

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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: content/renderer/browser_plugin/old/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/old/browser_plugin.cc b/content/renderer/browser_plugin/old/browser_plugin.cc
index af340e7bbeff59dd03f1173693ee6cb5b857fb36..987453d63d107edda1856c4cb7227534374eea29 100644
--- a/content/renderer/browser_plugin/old/browser_plugin.cc
+++ b/content/renderer/browser_plugin/old/browser_plugin.cc
@@ -83,11 +83,25 @@ BrowserPlugin::BrowserPlugin(
ParseSrcAttribute("", &src);
if (!src.empty()) {
- render_view->Send(new BrowserPluginHostMsg_NavigateFromEmbedder(
- render_view->GetRoutingID(),
- id_,
- frame->identifier(),
- src));
+ WebKit::WebView* web_view = render_view->webview();
Fady Samuel 2012/07/06 15:14:44 Given you're now applying changes to the new desig
+ if (web_view) {
+ WebGraphicsContext3DCommandBufferImpl* context = static_cast<WebGraphicsContext3DCommandBufferImpl*>(web_view->sharedGraphicsContext3D());
+ DCHECK(context);
+ BrowserPluginHostMsg_Surface_Params params;
+ params.gpu_process_id = context->GetGPUProcessID();
+ params.client_id = context->GetChannelID();
+ params.context_id = context->GetContextID();
+ params.texture_id[0] = context->createTexture();
+ params.texture_id[1] = context->createTexture();
+ params.sync_point = context->insertSyncPoint();
+ printf("Giving guest textures %u and %u\n", params.texture_id[0], params.texture_id[1]);
+ render_view->Send(new BrowserPluginHostMsg_NavigateFromEmbedder(
+ render_view->GetRoutingID(),
+ id_,
+ frame->identifier(),
+ src,
+ params));
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698