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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 12908004: Lazy initialize WGC3DInProcessCommandBufferImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cleanups Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 gfx::GLSurface::InitializeOneOff(); 488 gfx::GLSurface::InitializeOneOff();
489 break; 489 break;
490 case GL_BINDING_SOFTWARE_RENDERER: 490 case GL_BINDING_SOFTWARE_RENDERER:
491 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); 491 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
492 break; 492 break;
493 default: 493 default:
494 NOTREACHED(); 494 NOTREACHED();
495 } 495 }
496 } 496 }
497 497
498 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D(
499 const WebKit::WebGraphicsContext3D::Attributes& attributes,
500 WebKit::WebView* web_view) {
501 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context(
502 new WebGraphicsContext3DInProcessCommandBufferImpl());
503 if (!context->Initialize(attributes, NULL))
504 return NULL;
505 return context.release();
506 }
507
508 WebKit::WebLayerTreeView* CreateLayerTreeView( 498 WebKit::WebLayerTreeView* CreateLayerTreeView(
509 LayerTreeViewType type, 499 LayerTreeViewType type,
510 DRTLayerTreeViewClient* client, 500 DRTLayerTreeViewClient* client,
511 WebKit::WebThread* thread) { 501 WebKit::WebThread* thread) {
512 scoped_ptr<cc::Thread> compositor_thread; 502 scoped_ptr<cc::Thread> compositor_thread;
513 if (thread) 503 if (thread)
514 compositor_thread = cc::ThreadImpl::CreateForDifferentThread( 504 compositor_thread = cc::ThreadImpl::CreateForDifferentThread(
515 static_cast<webkit_glue::WebThreadImpl*>(thread)-> 505 static_cast<webkit_glue::WebThreadImpl*>(thread)->
516 message_loop()->message_loop_proxy()); 506 message_loop()->message_loop_proxy());
517 507
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // Logging 885 // Logging
896 void EnableWebCoreLogChannels(const std::string& channels) { 886 void EnableWebCoreLogChannels(const std::string& channels) {
897 webkit_glue::EnableWebCoreLogChannels(channels); 887 webkit_glue::EnableWebCoreLogChannels(channels);
898 } 888 }
899 889
900 void SetGamepadData(const WebKit::WebGamepads& pads) { 890 void SetGamepadData(const WebKit::WebGamepads& pads) {
901 test_environment->webkit_platform_support()->setGamepadData(pads); 891 test_environment->webkit_platform_support()->setGamepadData(pads);
902 } 892 }
903 893
904 } // namespace webkit_support 894 } // namespace webkit_support
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698