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

Unified Diff: chrome/renderer/render_view.cc

Issue 3531008: Integrated Pepper3D v2 with the accelerated compositor.... (Closed) Base URL: svn://chrome-svn/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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 65093)
+++ chrome/renderer/render_view.cc (working copy)
@@ -86,6 +86,7 @@
#include "chrome/renderer/user_script_idle_scheduler.h"
#include "chrome/renderer/user_script_slave.h"
#include "chrome/renderer/visitedlink_slave.h"
+#include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h"
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "chrome/renderer/webplugin_delegate_proxy.h"
#include "chrome/renderer/websharedworker_proxy.h"
@@ -2620,14 +2621,19 @@
if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) &&
!cmd_line->HasSwitch(switches::kDisableAcceleratedCompositing)) {
+ WebGraphicsContext3DCommandBufferImpl* context =
+ static_cast<WebGraphicsContext3DCommandBufferImpl*>(
+ frame->view()->graphicsContext3D());
+ if (!context)
+ return NULL;
+
// Add the hardware video decoder factory.
- // TODO(hclam): This assumes that ggl::Context is set to current
- // internally. I need to make it more explicit to get the context.
- bool ret = frame->view()->graphicsContext3D()->makeContextCurrent();
+ // TODO(hclam): This will cause the renderer process to crash on context
+ // lost.
+ bool ret = context->makeContextCurrent();
CHECK(ret) << "Failed to switch context";
-
collection->AddFilter(new IpcVideoDecoder(
- MessageLoop::current(), ggl::GetCurrentContext()));
+ MessageLoop::current(), context->context()));
}
WebApplicationCacheHostImpl* appcache_host =

Powered by Google App Engine
This is Rietveld 408576698