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

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

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: clang-format Created 7 years, 4 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 | « cc/test/layer_tree_test.h ('k') | cc/test/test_web_graphics_context_3d.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"
11 #include "cc/animation/timing_function.h" 11 #include "cc/animation/timing_function.h"
12 #include "cc/base/switches.h" 12 #include "cc/base/switches.h"
13 #include "cc/debug/fake_context_provider.h"
13 #include "cc/input/input_handler.h" 14 #include "cc/input/input_handler.h"
14 #include "cc/layers/content_layer.h" 15 #include "cc/layers/content_layer.h"
15 #include "cc/layers/layer.h" 16 #include "cc/layers/layer.h"
16 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
17 #include "cc/test/animation_test_common.h" 18 #include "cc/test/animation_test_common.h"
18 #include "cc/test/fake_context_provider.h"
19 #include "cc/test/fake_layer_tree_host_client.h" 19 #include "cc/test/fake_layer_tree_host_client.h"
20 #include "cc/test/fake_output_surface.h" 20 #include "cc/test/fake_output_surface.h"
21 #include "cc/test/occlusion_tracker_test_common.h" 21 #include "cc/test/occlusion_tracker_test_common.h"
22 #include "cc/test/tiled_layer_test_common.h" 22 #include "cc/test/tiled_layer_test_common.h"
23 #include "cc/trees/layer_tree_host_impl.h" 23 #include "cc/trees/layer_tree_host_impl.h"
24 #include "cc/trees/single_thread_proxy.h" 24 #include "cc/trees/single_thread_proxy.h"
25 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
26 #include "ui/gfx/size_conversions.h" 26 #include "ui/gfx/size_conversions.h"
27 27
28 namespace cc { 28 namespace cc {
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 else 608 else
609 output_surface = FakeOutputSurface::Create3d(); 609 output_surface = FakeOutputSurface::Create3d();
610 output_surface_ = output_surface.get(); 610 output_surface_ = output_surface.get();
611 return output_surface.PassAs<OutputSurface>(); 611 return output_surface.PassAs<OutputSurface>();
612 } 612 }
613 613
614 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 614 scoped_refptr<cc::ContextProvider> LayerTreeTest::
615 OffscreenContextProviderForMainThread() { 615 OffscreenContextProviderForMainThread() {
616 if (!main_thread_contexts_.get() || 616 if (!main_thread_contexts_.get() ||
617 main_thread_contexts_->DestroyedOnMainThread()) { 617 main_thread_contexts_->DestroyedOnMainThread()) {
618 main_thread_contexts_ = FakeContextProvider::Create(); 618 main_thread_contexts_ = FakeContextProvider::Create(
619 TestWebGraphicsContext3D::CreateBaseFactory());
619 if (!main_thread_contexts_->BindToCurrentThread()) 620 if (!main_thread_contexts_->BindToCurrentThread())
620 main_thread_contexts_ = NULL; 621 main_thread_contexts_ = NULL;
621 } 622 }
622 return main_thread_contexts_; 623 return main_thread_contexts_;
623 } 624 }
624 625
625 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 626 scoped_refptr<cc::ContextProvider> LayerTreeTest::
626 OffscreenContextProviderForCompositorThread() { 627 OffscreenContextProviderForCompositorThread() {
627 if (!compositor_thread_contexts_.get() || 628 if (!compositor_thread_contexts_.get() ||
628 compositor_thread_contexts_->DestroyedOnMainThread()) 629 compositor_thread_contexts_->DestroyedOnMainThread())
629 compositor_thread_contexts_ = FakeContextProvider::Create(); 630 compositor_thread_contexts_ = FakeContextProvider::Create(
631 TestWebGraphicsContext3D::CreateBaseFactory());
630 return compositor_thread_contexts_; 632 return compositor_thread_contexts_;
631 } 633 }
632 634
633 } // namespace cc 635 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698