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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2340143002: cc: Rename LayerTreeHost to LayerTreeHostInProcess. (Closed)
Patch Set: comment fix Created 4 years, 3 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/trees/threaded_channel.cc ('k') | content/renderer/gpu/render_widget_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 27 matching lines...) Expand all
38 #include "cc/output/output_surface_client.h" 38 #include "cc/output/output_surface_client.h"
39 #include "cc/output/texture_mailbox_deleter.h" 39 #include "cc/output/texture_mailbox_deleter.h"
40 #include "cc/output/vulkan_in_process_context_provider.h" 40 #include "cc/output/vulkan_in_process_context_provider.h"
41 #include "cc/raster/single_thread_task_graph_runner.h" 41 #include "cc/raster/single_thread_task_graph_runner.h"
42 #include "cc/resources/ui_resource_manager.h" 42 #include "cc/resources/ui_resource_manager.h"
43 #include "cc/scheduler/begin_frame_source.h" 43 #include "cc/scheduler/begin_frame_source.h"
44 #include "cc/surfaces/direct_compositor_frame_sink.h" 44 #include "cc/surfaces/direct_compositor_frame_sink.h"
45 #include "cc/surfaces/display.h" 45 #include "cc/surfaces/display.h"
46 #include "cc/surfaces/display_scheduler.h" 46 #include "cc/surfaces/display_scheduler.h"
47 #include "cc/surfaces/surface_id_allocator.h" 47 #include "cc/surfaces/surface_id_allocator.h"
48 #include "cc/trees/layer_tree_host.h" 48 #include "cc/trees/layer_tree_host_in_process.h"
49 #include "cc/trees/layer_tree_settings.h" 49 #include "cc/trees/layer_tree_settings.h"
50 #include "components/display_compositor/compositor_overlay_candidate_validator_a ndroid.h" 50 #include "components/display_compositor/compositor_overlay_candidate_validator_a ndroid.h"
51 #include "components/display_compositor/gl_helper.h" 51 #include "components/display_compositor/gl_helper.h"
52 #include "content/browser/android/child_process_launcher_android.h" 52 #include "content/browser/android/child_process_launcher_android.h"
53 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 53 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
54 #include "content/browser/gpu/compositor_util.h" 54 #include "content/browser/gpu/compositor_util.h"
55 #include "content/browser/gpu/gpu_surface_tracker.h" 55 #include "content/browser/gpu/gpu_surface_tracker.h"
56 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" 56 #include "content/browser/renderer_host/context_provider_factory_impl_android.h"
57 #include "content/browser/renderer_host/render_widget_host_impl.h" 57 #include "content/browser/renderer_host/render_widget_host_impl.h"
58 #include "content/common/gpu/client/context_provider_command_buffer.h" 58 #include "content/common/gpu/client/context_provider_command_buffer.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 settings.renderer_settings.highp_threshold_min = 2048; 488 settings.renderer_settings.highp_threshold_min = 2048;
489 settings.use_zero_copy = true; 489 settings.use_zero_copy = true;
490 490
491 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 491 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
492 settings.initial_debug_state.SetRecordRenderingStats( 492 settings.initial_debug_state.SetRecordRenderingStats(
493 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 493 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
494 settings.initial_debug_state.show_fps_counter = 494 settings.initial_debug_state.show_fps_counter =
495 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 495 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
496 settings.single_thread_proxy_scheduler = true; 496 settings.single_thread_proxy_scheduler = true;
497 497
498 cc::LayerTreeHost::InitParams params; 498 cc::LayerTreeHostInProcess::InitParams params;
499 params.client = this; 499 params.client = this;
500 params.shared_bitmap_manager = HostSharedBitmapManager::current(); 500 params.shared_bitmap_manager = HostSharedBitmapManager::current();
501 params.gpu_memory_buffer_manager = BrowserGpuMemoryBufferManager::current(); 501 params.gpu_memory_buffer_manager = BrowserGpuMemoryBufferManager::current();
502 params.task_graph_runner = g_task_graph_runner.Pointer(); 502 params.task_graph_runner = g_task_graph_runner.Pointer();
503 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 503 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
504 params.settings = &settings; 504 params.settings = &settings;
505 params.animation_host = cc::AnimationHost::CreateMainInstance(); 505 params.animation_host = cc::AnimationHost::CreateMainInstance();
506 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 506 host_ = cc::LayerTreeHostInProcess::CreateSingleThreaded(this, &params);
507 DCHECK(!host_->IsVisible()); 507 DCHECK(!host_->IsVisible());
508 host_->GetLayerTree()->SetRootLayer(root_window_->GetLayer()); 508 host_->GetLayerTree()->SetRootLayer(root_window_->GetLayer());
509 host_->SetSurfaceClientId(surface_id_allocator_->client_id()); 509 host_->SetSurfaceClientId(surface_id_allocator_->client_id());
510 host_->GetLayerTree()->SetViewportSize(size_); 510 host_->GetLayerTree()->SetViewportSize(size_);
511 host_->GetLayerTree()->set_has_transparent_background( 511 host_->GetLayerTree()->set_has_transparent_background(
512 has_transparent_background_); 512 has_transparent_background_);
513 host_->GetLayerTree()->set_background_color(SK_ColorBLACK); 513 host_->GetLayerTree()->set_background_color(SK_ColorBLACK);
514 host_->GetLayerTree()->SetDeviceScaleFactor(device_scale_factor_); 514 host_->GetLayerTree()->SetDeviceScaleFactor(device_scale_factor_);
515 515
516 if (needs_animate_) 516 if (needs_animate_)
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 810
811 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); 811 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate");
812 host_->SetNeedsAnimate(); 812 host_->SetNeedsAnimate();
813 } 813 }
814 814
815 bool CompositorImpl::HavePendingReadbacks() { 815 bool CompositorImpl::HavePendingReadbacks() {
816 return !readback_layer_tree_->children().empty(); 816 return !readback_layer_tree_->children().empty();
817 } 817 }
818 818
819 } // namespace content 819 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.cc ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698