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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 349 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
350 return WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( | 350 return WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( |
351 attributes); | 351 attributes); |
352 } | 352 } |
353 | 353 |
354 WebKit::WebGraphicsContext3DProvider* TestWebKitPlatformSupport:: | 354 WebKit::WebGraphicsContext3DProvider* TestWebKitPlatformSupport:: |
355 createSharedOffscreenGraphicsContext3DProvider() { | 355 createSharedOffscreenGraphicsContext3DProvider() { |
356 main_thread_contexts_ = | 356 main_thread_contexts_ = |
357 webkit::gpu::TestContextProviderFactory::GetInstance()-> | 357 webkit::gpu::TestContextProviderFactory::GetInstance()-> |
358 OffscreenContextProviderForMainThread(); | 358 OffscreenContextProviderForMainThread(); |
359 if (!main_thread_contexts_) | 359 if (!main_thread_contexts_.get()) |
360 return NULL; | 360 return NULL; |
361 return new webkit::gpu::WebGraphicsContext3DProviderImpl( | 361 return new webkit::gpu::WebGraphicsContext3DProviderImpl( |
362 main_thread_contexts_); | 362 main_thread_contexts_); |
363 } | 363 } |
364 | 364 |
365 bool TestWebKitPlatformSupport::canAccelerate2dCanvas() { | 365 bool TestWebKitPlatformSupport::canAccelerate2dCanvas() { |
366 // We supply an OS-MESA based context for accelarated 2d | 366 // We supply an OS-MESA based context for accelarated 2d |
367 // canvas, which should always work. | 367 // canvas, which should always work. |
368 return true; | 368 return true; |
369 } | 369 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 return view.release(); | 511 return view.release(); |
512 } | 512 } |
513 | 513 |
514 WebKit::WebLayerTreeView* | 514 WebKit::WebLayerTreeView* |
515 TestWebKitPlatformSupport::createLayerTreeViewForTesting( | 515 TestWebKitPlatformSupport::createLayerTreeViewForTesting( |
516 TestViewType type) { | 516 TestViewType type) { |
517 DCHECK_EQ(TestViewTypeUnitTest, type); | 517 DCHECK_EQ(TestViewTypeUnitTest, type); |
518 return createLayerTreeViewForTesting(); | 518 return createLayerTreeViewForTesting(); |
519 } | 519 } |
520 | 520 |
OLD | NEW |