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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 16833003: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/scheduler_test_common.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 ASSERT_FALSE(layer_tree_host_.get()); 582 ASSERT_FALSE(layer_tree_host_.get());
583 client_.reset(); 583 client_.reset();
584 if (timed_out_) { 584 if (timed_out_) {
585 FAIL() << "Test timed out"; 585 FAIL() << "Test timed out";
586 return; 586 return;
587 } 587 }
588 AfterTest(); 588 AfterTest();
589 } 589 }
590 590
591 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() { 591 scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
592 scoped_ptr<FakeOutputSurface> output_surface;
592 if (delegating_renderer_) 593 if (delegating_renderer_)
593 return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>(); 594 output_surface = FakeOutputSurface::CreateDelegating3d();
594 return FakeOutputSurface::Create3d().PassAs<OutputSurface>(); 595 else
596 output_surface = FakeOutputSurface::Create3d();
597 output_surface_ = output_surface.get();
598 return output_surface.PassAs<OutputSurface>();
595 } 599 }
596 600
597 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 601 scoped_refptr<cc::ContextProvider> LayerTreeTest::
598 OffscreenContextProviderForMainThread() { 602 OffscreenContextProviderForMainThread() {
599 if (!main_thread_contexts_.get() || 603 if (!main_thread_contexts_.get() ||
600 main_thread_contexts_->DestroyedOnMainThread()) { 604 main_thread_contexts_->DestroyedOnMainThread()) {
601 main_thread_contexts_ = FakeContextProvider::Create(); 605 main_thread_contexts_ = FakeContextProvider::Create();
602 if (!main_thread_contexts_->BindToCurrentThread()) 606 if (!main_thread_contexts_->BindToCurrentThread())
603 main_thread_contexts_ = NULL; 607 main_thread_contexts_ = NULL;
604 } 608 }
605 return main_thread_contexts_; 609 return main_thread_contexts_;
606 } 610 }
607 611
608 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 612 scoped_refptr<cc::ContextProvider> LayerTreeTest::
609 OffscreenContextProviderForCompositorThread() { 613 OffscreenContextProviderForCompositorThread() {
610 if (!compositor_thread_contexts_.get() || 614 if (!compositor_thread_contexts_.get() ||
611 compositor_thread_contexts_->DestroyedOnMainThread()) 615 compositor_thread_contexts_->DestroyedOnMainThread())
612 compositor_thread_contexts_ = FakeContextProvider::Create(); 616 compositor_thread_contexts_ = FakeContextProvider::Create();
613 return compositor_thread_contexts_; 617 return compositor_thread_contexts_;
614 } 618 }
615 619
616 } // namespace cc 620 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698