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

Unified Diff: ui/gfx/compositor/compositor.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
Index: ui/gfx/compositor/compositor.cc
diff --git a/ui/gfx/compositor/compositor.cc b/ui/gfx/compositor/compositor.cc
index 54d5b80c09c1b9f9da541665fe45b45e47ce9e71..507e9d2cc7a7146297c93f5130570f59f9dd3a74 100644
--- a/ui/gfx/compositor/compositor.cc
+++ b/ui/gfx/compositor/compositor.cc
@@ -252,15 +252,16 @@ WebKit::WebGraphicsContext3D* Compositor::createContext3D() {
WebKit::WebGraphicsContext3D* context;
if (test_compositor_enabled) {
// Use context that results in no rendering to the screen.
- context = new TestWebGraphicsContext3D();
+ TestWebGraphicsContext3D* test_context = new TestWebGraphicsContext3D();
+ test_context->Initialize();
+ context = test_context;
} else {
gfx::GLShareGroup* share_group =
SharedResources::GetInstance()->GetShareGroup();
- context = new webkit::gpu::WebGraphicsContext3DInProcessImpl(
- widget_, share_group);
+ WebKit::WebGraphicsContext3D::Attributes attrs;
+ context = webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWindow(
+ attrs, widget_, share_group);
}
- WebKit::WebGraphicsContext3D::Attributes attrs;
- context->initialize(attrs, 0, true);
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kDisableUIVsync)) {
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | ui/gfx/compositor/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698