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

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

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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.cc » ('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/test_web_graphics_context_3d.h" 8 #include "cc/test/test_web_graphics_context_3d.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 24 matching lines...) Expand all
35 .PassAs<WebKit::WebGraphicsContext3D>()) 35 .PassAs<WebKit::WebGraphicsContext3D>())
36 .PassAs<OutputSurface>(); 36 .PassAs<OutputSurface>();
37 } 37 }
38 38
39 return FakeOutputSurface::Create3d( 39 return FakeOutputSurface::Create3d(
40 TestWebGraphicsContext3D::Create(attrs) 40 TestWebGraphicsContext3D::Create(attrs)
41 .PassAs<WebKit::WebGraphicsContext3D>()) 41 .PassAs<WebKit::WebGraphicsContext3D>())
42 .PassAs<OutputSurface>(); 42 .PassAs<OutputSurface>();
43 } 43 }
44 44
45 scoped_ptr<InputHandlerClient>
46 FakeLayerTreeHostClient::CreateInputHandlerClient() {
47 return scoped_ptr<InputHandlerClient>();
48 }
49
50 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient:: 45 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient::
51 OffscreenContextProviderForMainThread() { 46 OffscreenContextProviderForMainThread() {
52 if (!main_thread_contexts_ || 47 if (!main_thread_contexts_ ||
53 main_thread_contexts_->DestroyedOnMainThread()) { 48 main_thread_contexts_->DestroyedOnMainThread()) {
54 main_thread_contexts_ = FakeContextProvider::Create(); 49 main_thread_contexts_ = FakeContextProvider::Create();
55 if (!main_thread_contexts_->BindToCurrentThread()) 50 if (!main_thread_contexts_->BindToCurrentThread())
56 main_thread_contexts_ = NULL; 51 main_thread_contexts_ = NULL;
57 } 52 }
58 return main_thread_contexts_; 53 return main_thread_contexts_;
59 } 54 }
60 55
61 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient:: 56 scoped_refptr<cc::ContextProvider> FakeLayerTreeHostClient::
62 OffscreenContextProviderForCompositorThread() { 57 OffscreenContextProviderForCompositorThread() {
63 if (!compositor_thread_contexts_ || 58 if (!compositor_thread_contexts_ ||
64 compositor_thread_contexts_->DestroyedOnMainThread()) 59 compositor_thread_contexts_->DestroyedOnMainThread())
65 compositor_thread_contexts_ = FakeContextProvider::Create(); 60 compositor_thread_contexts_ = FakeContextProvider::Create();
66 return compositor_thread_contexts_; 61 return compositor_thread_contexts_;
67 } 62 }
68 63
69 } // namespace cc 64 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_client.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698