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

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

Issue 12908004: Lazy initialize WGC3DInProcessCommandBufferImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: explicit constructor Created 7 years, 8 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
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 return view.release(); 537 return view.release();
542 } 538 }
543 539
544 WebKit::WebLayerTreeView* 540 WebKit::WebLayerTreeView*
545 TestWebKitPlatformSupport::createLayerTreeViewForTesting( 541 TestWebKitPlatformSupport::createLayerTreeViewForTesting(
546 TestViewType type) { 542 TestViewType type) {
547 DCHECK_EQ(TestViewTypeUnitTest, type); 543 DCHECK_EQ(TestViewTypeUnitTest, type);
548 return createLayerTreeViewForTesting(); 544 return createLayerTreeViewForTesting();
549 } 545 }
550 546
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc ('k') | webkit/support/webkit_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698