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

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

Issue 2895273002: Unified the use of BufferToTextureTargetMap for all the Processes (Closed)
Patch Set: nit taken care Created 3 years, 5 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
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 cc::LayerTreeSettings settings; 531 cc::LayerTreeSettings settings;
532 settings.use_zero_copy = true; 532 settings.use_zero_copy = true;
533 533
534 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 534 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
535 settings.initial_debug_state.SetRecordRenderingStats( 535 settings.initial_debug_state.SetRecordRenderingStats(
536 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 536 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
537 settings.initial_debug_state.show_fps_counter = 537 settings.initial_debug_state.show_fps_counter =
538 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 538 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
539 settings.single_thread_proxy_scheduler = true; 539 settings.single_thread_proxy_scheduler = true;
540 settings.resource_settings.buffer_to_texture_target_map =
541 CreateBufferToTextureTargetMap();
540 542
541 animation_host_ = cc::AnimationHost::CreateMainInstance(); 543 animation_host_ = cc::AnimationHost::CreateMainInstance();
542 544
543 cc::LayerTreeHost::InitParams params; 545 cc::LayerTreeHost::InitParams params;
544 params.client = this; 546 params.client = this;
545 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; 547 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner;
546 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 548 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
547 params.settings = &settings; 549 params.settings = &settings;
548 params.mutator_host = animation_host_.get(); 550 params.mutator_host = animation_host_.get();
549 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 551 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 908 }
907 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 909 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
908 frame_sink_id); 910 frame_sink_id);
909 } 911 }
910 912
911 bool CompositorImpl::HavePendingReadbacks() { 913 bool CompositorImpl::HavePendingReadbacks() {
912 return !readback_layer_tree_->children().empty(); 914 return !readback_layer_tree_->children().empty();
913 } 915 }
914 916
915 } // namespace content 917 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698