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

Unified Diff: ui/gfx/compositor/compositor_cc.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc
diff --git a/ui/gfx/compositor/compositor_cc.cc b/ui/gfx/compositor/compositor_cc.cc
index 8957990c10b3f8402a424f2117bb22355afe298c..fa82ae1e7f5e5f7419373f22c9e664262bb4a7cf 100644
--- a/ui/gfx/compositor/compositor_cc.cc
+++ b/ui/gfx/compositor/compositor_cc.cc
@@ -262,15 +262,16 @@ WebKit::WebGraphicsContext3D* CompositorCC::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 =
SharedResourcesCC::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)) {

Powered by Google App Engine
This is Rietveld 408576698