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

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

Issue 12378094: Implement WebKit::Platform::isThreadedCompositingEnabled() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | webkit/support/webkit_support.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #elif defined(OS_MACOSX) 65 #elif defined(OS_MACOSX)
66 #include "base/mac/mac_util.h" 66 #include "base/mac/mac_util.h"
67 #endif 67 #endif
68 68
69 using WebKit::WebLayerTreeViewImplForTesting; 69 using WebKit::WebLayerTreeViewImplForTesting;
70 using WebKit::WebScriptController; 70 using WebKit::WebScriptController;
71 71
72 TestWebKitPlatformSupport::TestWebKitPlatformSupport(bool unit_test_mode, 72 TestWebKitPlatformSupport::TestWebKitPlatformSupport(bool unit_test_mode,
73 WebKit::Platform* shadow_platform_delegate) 73 WebKit::Platform* shadow_platform_delegate)
74 : unit_test_mode_(unit_test_mode), 74 : unit_test_mode_(unit_test_mode),
75 shadow_platform_delegate_(shadow_platform_delegate) { 75 shadow_platform_delegate_(shadow_platform_delegate),
76 threaded_compositing_enabled_(false) {
76 v8::V8::SetCounterFunction(base::StatsTable::FindLocation); 77 v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
77 78
78 WebKit::initialize(this); 79 WebKit::initialize(this);
79 WebKit::setLayoutTestMode(true); 80 WebKit::setLayoutTestMode(true);
80 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( 81 WebKit::WebSecurityPolicy::registerURLSchemeAsLocal(
81 WebKit::WebString::fromUTF8("test-shell-resource")); 82 WebKit::WebString::fromUTF8("test-shell-resource"));
82 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( 83 WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess(
83 WebKit::WebString::fromUTF8("test-shell-resource")); 84 WebKit::WebString::fromUTF8("test-shell-resource"));
84 WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated( 85 WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(
85 WebKit::WebString::fromUTF8("test-shell-resource")); 86 WebKit::WebString::fromUTF8("test-shell-resource"));
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 return NULL; 407 return NULL;
407 return main_thread_contexts_->GrContext(); 408 return main_thread_contexts_->GrContext();
408 } 409 }
409 410
410 bool TestWebKitPlatformSupport::canAccelerate2dCanvas() { 411 bool TestWebKitPlatformSupport::canAccelerate2dCanvas() {
411 // We supply an OS-MESA based context for accelarated 2d 412 // We supply an OS-MESA based context for accelarated 2d
412 // canvas, which should always work. 413 // canvas, which should always work.
413 return true; 414 return true;
414 } 415 }
415 416
417 bool TestWebKitPlatformSupport::isThreadedCompositingEnabled() {
418 return threaded_compositing_enabled_;
419 }
420
416 double TestWebKitPlatformSupport::audioHardwareSampleRate() { 421 double TestWebKitPlatformSupport::audioHardwareSampleRate() {
417 return 44100.0; 422 return 44100.0;
418 } 423 }
419 424
420 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() { 425 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() {
421 return 128; 426 return 128;
422 } 427 }
423 428
424 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice( 429 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice(
425 size_t bufferSize, unsigned numberOfInputChannels, 430 size_t bufferSize, unsigned numberOfInputChannels,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 return view.release(); 580 return view.release();
576 } 581 }
577 582
578 WebKit::WebLayerTreeView* 583 WebKit::WebLayerTreeView*
579 TestWebKitPlatformSupport::createLayerTreeViewForTesting( 584 TestWebKitPlatformSupport::createLayerTreeViewForTesting(
580 TestViewType type) { 585 TestViewType type) {
581 DCHECK_EQ(TestViewTypeUnitTest, type); 586 DCHECK_EQ(TestViewTypeUnitTest, type);
582 return createLayerTreeViewForTesting(); 587 return createLayerTreeViewForTesting();
583 } 588 }
584 589
OLDNEW
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | webkit/support/webkit_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698