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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 9297046: Add WebKitPlatformSupport::createOffscreenGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: churn Created 8 years, 11 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/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 80bb6fa3ef664a166e7bb60a761019a8cdc462ef..7e0f79603dbfe4fa535ee2c399189a0ebf55b4ad 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -581,6 +581,28 @@ RendererWebKitPlatformSupportImpl::createGraphicsContext3D() {
}
}
+WebKit::WebGraphicsContext3D*
+RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D(
+ const WebGraphicsContext3D::Attributes& attributes) {
+ // The WebGraphicsContext3DInProcessImpl code path is used for
+ // layout tests (though not through this code) as well as for
+ // debugging and bringing up new ports.
+ scoped_ptr<WebGraphicsContext3D> context;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
+ context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl(
+ gfx::kNullPluginWindow, NULL));
+ } else {
+#if defined(ENABLE_GPU)
+ context.reset(new WebGraphicsContext3DCommandBufferImpl());
+#else
+ return NULL;
+#endif
+ }
+ if (!context->initialize(attributes, NULL, false))
+ return NULL;
+ return context.release();
+}
+
double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() {
return audio_hardware::GetOutputSampleRate();
}
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | webkit/support/test_webkit_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698