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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows build 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
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ui/gfx/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 7e0f79603dbfe4fa535ee2c399189a0ebf55b4ad..5e62910f2e5d96a9bb844e2ea8ab281b0fd25df9 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -36,7 +36,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
@@ -565,42 +564,21 @@ RendererWebKitPlatformSupportImpl::sharedWorkerRepository() {
}
WebKit::WebGraphicsContext3D*
-RendererWebKitPlatformSupportImpl::createGraphicsContext3D() {
- // The WebGraphicsContext3DInProcessImpl code path is used for
- // layout tests (though not through this code) as well as for
- // debugging and bringing up new ports.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
- return new webkit::gpu::WebGraphicsContext3DInProcessImpl(
- gfx::kNullPluginWindow, NULL);
- } else {
-#if defined(ENABLE_GPU)
- return new WebGraphicsContext3DCommandBufferImpl();
-#else
- return NULL;
-#endif
- }
-}
-
-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));
+ return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
+ attributes, NULL, false);
} else {
-#if defined(ENABLE_GPU)
+ scoped_ptr<WebGraphicsContext3D> context;
context.reset(new WebGraphicsContext3DCommandBufferImpl());
-#else
- return NULL;
-#endif
+ if (!context->initialize(attributes, NULL, false))
+ return NULL;
+ return context.release();
}
- if (!context->initialize(attributes, NULL, false))
- return NULL;
- return context.release();
}
double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() {
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ui/gfx/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698