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 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context( | 377 return new WebGraphicsContext3DInProcessCommandBufferImpl(attributes); |
378 new WebGraphicsContext3DInProcessCommandBufferImpl()); | |
379 if (!context->Initialize(attributes, NULL)) | |
380 return NULL; | |
381 return context.release(); | |
382 } | 378 } |
383 | 379 |
384 WebKit::WebGraphicsContext3D* | 380 WebKit::WebGraphicsContext3D* |
385 TestWebKitPlatformSupport::sharedOffscreenGraphicsContext3D() { | 381 TestWebKitPlatformSupport::sharedOffscreenGraphicsContext3D() { |
386 main_thread_contexts_ = | 382 main_thread_contexts_ = |
387 webkit::gpu::TestContextProviderFactory::GetInstance()-> | 383 webkit::gpu::TestContextProviderFactory::GetInstance()-> |
388 OffscreenContextProviderForMainThread(); | 384 OffscreenContextProviderForMainThread(); |
389 if (!main_thread_contexts_) | 385 if (!main_thread_contexts_) |
390 return NULL; | 386 return NULL; |
391 return main_thread_contexts_->Context3d(); | 387 return main_thread_contexts_->Context3d(); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 return view.release(); | 552 return view.release(); |
557 } | 553 } |
558 | 554 |
559 WebKit::WebLayerTreeView* | 555 WebKit::WebLayerTreeView* |
560 TestWebKitPlatformSupport::createLayerTreeViewForTesting( | 556 TestWebKitPlatformSupport::createLayerTreeViewForTesting( |
561 TestViewType type) { | 557 TestViewType type) { |
562 DCHECK_EQ(TestViewTypeUnitTest, type); | 558 DCHECK_EQ(TestViewTypeUnitTest, type); |
563 return createLayerTreeViewForTesting(); | 559 return createLayerTreeViewForTesting(); |
564 } | 560 } |
565 | 561 |
OLD | NEW |