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

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: BufferToTextureTargetMap for Browser Process Created 3 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
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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 settings.renderer_settings.allow_antialiasing = false; 520 settings.renderer_settings.allow_antialiasing = false;
521 settings.renderer_settings.highp_threshold_min = 2048; 521 settings.renderer_settings.highp_threshold_min = 2048;
522 settings.use_zero_copy = true; 522 settings.use_zero_copy = true;
523 523
524 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 524 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
525 settings.initial_debug_state.SetRecordRenderingStats( 525 settings.initial_debug_state.SetRecordRenderingStats(
526 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 526 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
527 settings.initial_debug_state.show_fps_counter = 527 settings.initial_debug_state.show_fps_counter =
528 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 528 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
529 settings.single_thread_proxy_scheduler = true; 529 settings.single_thread_proxy_scheduler = true;
530 std::string image_texture_target_string = command_line->GetSwitchValueASCII(
531 switches::kBrowserContentImageTextureTarget);
532 settings.renderer_settings.buffer_to_texture_target_map =
reveman 2017/05/31 15:06:09 why do we need a command line switch for this when
sujith 2017/06/01 06:56:07 I tried to follow the same way how the values are
533 cc::StringToBufferToTextureTargetMap(image_texture_target_string);
530 534
531 animation_host_ = cc::AnimationHost::CreateMainInstance(); 535 animation_host_ = cc::AnimationHost::CreateMainInstance();
532 536
533 cc::LayerTreeHost::InitParams params; 537 cc::LayerTreeHost::InitParams params;
534 params.client = this; 538 params.client = this;
535 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; 539 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner;
536 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 540 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
537 params.settings = &settings; 541 params.settings = &settings;
538 params.mutator_host = animation_host_.get(); 542 params.mutator_host = animation_host_.get();
539 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 543 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 885 }
882 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 886 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
883 frame_sink_id); 887 frame_sink_id);
884 } 888 }
885 889
886 bool CompositorImpl::HavePendingReadbacks() { 890 bool CompositorImpl::HavePendingReadbacks() {
887 return !readback_layer_tree_->children().empty(); 891 return !readback_layer_tree_->children().empty();
888 } 892 }
889 893
890 } // namespace content 894 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698