OLD | NEW |
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 void SetGraphicsContext3DImplementation(GraphicsContext3DImplementation impl) { | 415 void SetGraphicsContext3DImplementation(GraphicsContext3DImplementation impl) { |
416 g_graphics_context_3d_implementation = impl; | 416 g_graphics_context_3d_implementation = impl; |
417 } | 417 } |
418 | 418 |
419 GraphicsContext3DImplementation GetGraphicsContext3DImplementation() { | 419 GraphicsContext3DImplementation GetGraphicsContext3DImplementation() { |
420 return g_graphics_context_3d_implementation; | 420 return g_graphics_context_3d_implementation; |
421 } | 421 } |
422 | 422 |
423 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( | 423 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( |
424 const WebKit::WebGraphicsContext3D::Attributes& attributes, | 424 const WebKit::WebGraphicsContext3D::Attributes& attributes, |
| 425 WebKit::WebView* web_view) { |
| 426 return CreateGraphicsContext3D(attributes, web_view, true); |
| 427 } |
| 428 |
| 429 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( |
| 430 const WebKit::WebGraphicsContext3D::Attributes& attributes, |
425 WebKit::WebView* web_view, | 431 WebKit::WebView* web_view, |
426 bool direct) { | 432 bool direct) { |
427 switch (webkit_support::GetGraphicsContext3DImplementation()) { | 433 switch (webkit_support::GetGraphicsContext3DImplementation()) { |
428 case webkit_support::IN_PROCESS: | 434 case webkit_support::IN_PROCESS: |
429 return WebGraphicsContext3DInProcessImpl::CreateForWebView( | 435 return WebGraphicsContext3DInProcessImpl::CreateForWebView( |
430 attributes, direct); | 436 attributes, direct); |
431 case webkit_support::IN_PROCESS_COMMAND_BUFFER: { | 437 case webkit_support::IN_PROCESS_COMMAND_BUFFER: { |
432 WebKit::WebGraphicsContext3D* view_context = 0; | 438 WebKit::WebGraphicsContext3D* view_context = 0; |
433 if (!direct) | 439 if (!direct) |
434 view_context = web_view->graphicsContext3D(); | 440 view_context = web_view->graphicsContext3D(); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Logging | 787 // Logging |
782 void EnableWebCoreLogChannels(const std::string& channels) { | 788 void EnableWebCoreLogChannels(const std::string& channels) { |
783 webkit_glue::EnableWebCoreLogChannels(channels); | 789 webkit_glue::EnableWebCoreLogChannels(channels); |
784 } | 790 } |
785 | 791 |
786 void SetGamepadData(const WebKit::WebGamepads& pads) { | 792 void SetGamepadData(const WebKit::WebGamepads& pads) { |
787 test_environment->webkit_platform_support()->setGamepadData(pads); | 793 test_environment->webkit_platform_support()->setGamepadData(pads); |
788 } | 794 } |
789 | 795 |
790 } // namespace webkit_support | 796 } // namespace webkit_support |
OLD | NEW |