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

Side by Side Diff: cc/test/fake_layer_tree_host_client.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/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/test/fake_layer_tree_host_client.h" 5 #include "cc/test/fake_layer_tree_host_client.h"
6 6
7 #include "cc/output/context_provider.h" 7 #include "cc/output/context_provider.h"
8 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/test_web_graphics_context_3d.h" 9 #include "cc/test/test_web_graphics_context_3d.h"
9 10
10 namespace cc { 11 namespace cc {
11 12
12 FakeLayerTreeHostClient::FakeLayerTreeHostClient(RendererOptions options) 13 FakeLayerTreeHostClient::FakeLayerTreeHostClient(RendererOptions options)
13 : use_software_rendering_(options == DIRECT_SOFTWARE || 14 : use_software_rendering_(options == DIRECT_SOFTWARE ||
14 options == DELEGATED_SOFTWARE), 15 options == DELEGATED_SOFTWARE),
15 use_delegating_renderer_(options == DELEGATED_3D || 16 use_delegating_renderer_(options == DELEGATED_3D ||
16 options == DELEGATED_SOFTWARE) {} 17 options == DELEGATED_SOFTWARE) {}
17 18
(...skipping 14 matching lines...) Expand all
32 if (use_delegating_renderer_) 33 if (use_delegating_renderer_)
33 return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>(); 34 return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>();
34 35
35 return CreateFakeOutputSurface(); 36 return CreateFakeOutputSurface();
36 } 37 }
37 38
38 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient:: 39 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient::
39 OffscreenContextProviderForMainThread() { 40 OffscreenContextProviderForMainThread() {
40 if (!main_thread_contexts_.get() || 41 if (!main_thread_contexts_.get() ||
41 main_thread_contexts_->DestroyedOnMainThread()) { 42 main_thread_contexts_->DestroyedOnMainThread()) {
42 main_thread_contexts_ = FakeContextProvider::Create(); 43 main_thread_contexts_ = FakeContextProvider::Create(
44 TestWebGraphicsContext3D::CreateBaseFactory());
43 if (!main_thread_contexts_->BindToCurrentThread()) 45 if (!main_thread_contexts_->BindToCurrentThread())
44 main_thread_contexts_ = NULL; 46 main_thread_contexts_ = NULL;
45 } 47 }
46 return main_thread_contexts_; 48 return main_thread_contexts_;
47 } 49 }
48 50
49 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient:: 51 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient::
50 OffscreenContextProviderForCompositorThread() { 52 OffscreenContextProviderForCompositorThread() {
51 if (!compositor_thread_contexts_.get() || 53 if (!compositor_thread_contexts_.get() ||
52 compositor_thread_contexts_->DestroyedOnMainThread()) 54 compositor_thread_contexts_->DestroyedOnMainThread())
53 compositor_thread_contexts_ = FakeContextProvider::Create(); 55 compositor_thread_contexts_ = FakeContextProvider::Create(
56 TestWebGraphicsContext3D::CreateBaseFactory());
54 return compositor_thread_contexts_; 57 return compositor_thread_contexts_;
55 } 58 }
56 59
57 } // namespace cc 60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698