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

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

Issue 12226051: Clean up RenderWidget/RenderWidgetCompositor/WebKit interactions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: just diff relative to https://codereview.chromium.org/12377029/ 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 new WebGraphicsContext3DInProcessCommandBufferImpl()); 516 new WebGraphicsContext3DInProcessCommandBufferImpl());
517 if (!context->Initialize(attributes, NULL)) 517 if (!context->Initialize(attributes, NULL))
518 return NULL; 518 return NULL;
519 return context.release(); 519 return context.release();
520 } 520 }
521 } 521 }
522 NOTREACHED(); 522 NOTREACHED();
523 return NULL; 523 return NULL;
524 } 524 }
525 525
526 template <typename Client>
527 static WebKit::WebLayerTreeView* CreateLayerTreeView( 526 static WebKit::WebLayerTreeView* CreateLayerTreeView(
528 WebKit::WebLayerTreeViewImplForTesting::RenderingType type, 527 WebKit::WebLayerTreeViewImplForTesting::RenderingType type,
529 Client* client) { 528 DRTLayerTreeViewClient* client) {
530 scoped_ptr<WebKit::WebLayerTreeViewImplForTesting> view( 529 scoped_ptr<WebKit::WebLayerTreeViewImplForTesting> view(
531 new WebKit::WebLayerTreeViewImplForTesting(type, client)); 530 new WebKit::WebLayerTreeViewImplForTesting(type, client));
532 531
533 scoped_ptr<cc::Thread> compositor_thread; 532 scoped_ptr<cc::Thread> compositor_thread;
534 533
535 webkit::WebCompositorSupportImpl* compositor_support_impl = 534 webkit::WebCompositorSupportImpl* compositor_support_impl =
536 test_environment->webkit_platform_support()->compositor_support_impl(); 535 test_environment->webkit_platform_support()->compositor_support_impl();
537 if (compositor_support_impl->compositor_thread_message_loop_proxy()) 536 if (compositor_support_impl->compositor_thread_message_loop_proxy())
538 compositor_thread = cc::ThreadImpl::createForDifferentThread( 537 compositor_thread = cc::ThreadImpl::createForDifferentThread(
539 compositor_support_impl->compositor_thread_message_loop_proxy()); 538 compositor_support_impl->compositor_thread_message_loop_proxy());
540 539
541 if (!view->initialize(compositor_thread.Pass())) 540 if (!view->initialize(compositor_thread.Pass()))
542 return NULL; 541 return NULL;
543 return view.release(); 542 return view.release();
544 } 543 }
545 544
546 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware( 545 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware(
547 WebKit::WebLayerTreeViewClient* client) {
548 return CreateLayerTreeView(
549 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client);
550 }
551
552 WebKit::WebLayerTreeView* CreateLayerTreeView3d(
553 WebKit::WebLayerTreeViewClient* client) {
554 return CreateLayerTreeView(
555 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client);
556 }
557
558 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware(
559 DRTLayerTreeViewClient* client) { 546 DRTLayerTreeViewClient* client) {
560 return CreateLayerTreeView( 547 return CreateLayerTreeView(
561 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client); 548 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client);
562 } 549 }
563 550
564 WebKit::WebLayerTreeView* CreateLayerTreeView3d( 551 WebKit::WebLayerTreeView* CreateLayerTreeView3d(
565 DRTLayerTreeViewClient* client) { 552 DRTLayerTreeViewClient* client) {
566 return CreateLayerTreeView( 553 return CreateLayerTreeView(
567 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client); 554 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client);
568 } 555 }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 // Logging 919 // Logging
933 void EnableWebCoreLogChannels(const std::string& channels) { 920 void EnableWebCoreLogChannels(const std::string& channels) {
934 webkit_glue::EnableWebCoreLogChannels(channels); 921 webkit_glue::EnableWebCoreLogChannels(channels);
935 } 922 }
936 923
937 void SetGamepadData(const WebKit::WebGamepads& pads) { 924 void SetGamepadData(const WebKit::WebGamepads& pads) {
938 test_environment->webkit_platform_support()->setGamepadData(pads); 925 test_environment->webkit_platform_support()->setGamepadData(pads);
939 } 926 }
940 927
941 } // namespace webkit_support 928 } // namespace webkit_support
OLDNEW
« content/renderer/gpu/render_widget_compositor.cc ('K') | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698