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

Side by Side Diff: mojo/services/html_viewer/weblayertreeview_impl.cc

Issue 999173004: cc: Move worker threads to content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and webview fix Created 5 years, 9 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 | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/compositor.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/html_viewer/weblayertreeview_impl.h" 5 #include "mojo/services/html_viewer/weblayertreeview_impl.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "cc/blink/web_layer_impl.h" 8 #include "cc/blink/web_layer_impl.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 18 matching lines...) Expand all
29 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr(); 29 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr();
30 30
31 cc::LayerTreeSettings settings; 31 cc::LayerTreeSettings settings;
32 32
33 // For web contents, layer transforms should scale up the contents of layers 33 // For web contents, layer transforms should scale up the contents of layers
34 // to keep content always crisp when possible. 34 // to keep content always crisp when possible.
35 settings.layer_transforms_should_scale_layer_contents = true; 35 settings.layer_transforms_should_scale_layer_contents = true;
36 36
37 cc::SharedBitmapManager* shared_bitmap_manager = NULL; 37 cc::SharedBitmapManager* shared_bitmap_manager = NULL;
38 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager = NULL; 38 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager = NULL;
39 cc::TaskGraphRunner* task_graph_runner = NULL;
jamesr 2015/03/23 17:55:36 these 3 should all be nullptr does this being nul
reveman 2015/03/23 18:39:46 https://codereview.chromium.org/1023813004
39 40
40 layer_tree_host_ = 41 layer_tree_host_ =
41 cc::LayerTreeHost::CreateThreaded(this, 42 cc::LayerTreeHost::CreateThreaded(this,
42 shared_bitmap_manager, 43 shared_bitmap_manager,
43 gpu_memory_buffer_manager, 44 gpu_memory_buffer_manager,
45 task_graph_runner,
44 settings, 46 settings,
45 base::MessageLoopProxy::current(), 47 base::MessageLoopProxy::current(),
46 compositor_message_loop_proxy, 48 compositor_message_loop_proxy,
47 nullptr); 49 nullptr);
48 DCHECK(layer_tree_host_); 50 DCHECK(layer_tree_host_);
49 51
50 if (surface && gpu_service) { 52 if (surface && gpu_service) {
51 mojo::CommandBufferPtr cb; 53 mojo::CommandBufferPtr cb;
52 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb)); 54 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb));
53 scoped_refptr<cc::ContextProvider> context_provider( 55 scoped_refptr<cc::ContextProvider> context_provider(
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, 245 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread,
244 main_thread_bound_weak_ptr_, 246 main_thread_bound_weak_ptr_,
245 id)); 247 id));
246 } 248 }
247 249
248 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { 250 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) {
249 view_->SetSurfaceId(mojo::SurfaceId::From(id)); 251 view_->SetSurfaceId(mojo::SurfaceId::From(id));
250 } 252 }
251 253
252 } // namespace html_viewer 254 } // namespace html_viewer
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698