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/test_webkit_platform_support.h" | 5 #include "webkit/support/test_webkit_platform_support.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 367 |
368 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { | 368 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { |
369 return active_theme_engine_; | 369 return active_theme_engine_; |
370 } | 370 } |
371 #endif | 371 #endif |
372 | 372 |
373 WebKit::WebGraphicsContext3D* | 373 WebKit::WebGraphicsContext3D* |
374 TestWebKitPlatformSupport::createOffscreenGraphicsContext3D( | 374 TestWebKitPlatformSupport::createOffscreenGraphicsContext3D( |
375 const WebKit::WebGraphicsContext3D::Attributes& attributes) { | 375 const WebKit::WebGraphicsContext3D::Attributes& attributes) { |
376 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 376 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
377 return new WebGraphicsContext3DInProcessCommandBufferImpl(attributes); | 377 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context( |
| 378 new WebGraphicsContext3DInProcessCommandBufferImpl()); |
| 379 if (!context->Initialize(attributes, NULL)) |
| 380 return NULL; |
| 381 return context.release(); |
378 } | 382 } |
379 | 383 |
380 WebKit::WebGraphicsContext3D* | 384 WebKit::WebGraphicsContext3D* |
381 TestWebKitPlatformSupport::sharedOffscreenGraphicsContext3D() { | 385 TestWebKitPlatformSupport::sharedOffscreenGraphicsContext3D() { |
382 main_thread_contexts_ = | 386 main_thread_contexts_ = |
383 webkit::gpu::TestContextProviderFactory::GetInstance()-> | 387 webkit::gpu::TestContextProviderFactory::GetInstance()-> |
384 OffscreenContextProviderForMainThread(); | 388 OffscreenContextProviderForMainThread(); |
385 if (!main_thread_contexts_) | 389 if (!main_thread_contexts_) |
386 return NULL; | 390 return NULL; |
387 return main_thread_contexts_->Context3d(); | 391 return main_thread_contexts_->Context3d(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 return view.release(); | 541 return view.release(); |
538 } | 542 } |
539 | 543 |
540 WebKit::WebLayerTreeView* | 544 WebKit::WebLayerTreeView* |
541 TestWebKitPlatformSupport::createLayerTreeViewForTesting( | 545 TestWebKitPlatformSupport::createLayerTreeViewForTesting( |
542 TestViewType type) { | 546 TestViewType type) { |
543 DCHECK_EQ(TestViewTypeUnitTest, type); | 547 DCHECK_EQ(TestViewTypeUnitTest, type); |
544 return createLayerTreeViewForTesting(); | 548 return createLayerTreeViewForTesting(); |
545 } | 549 } |
546 | 550 |
OLD | NEW |