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

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: Unified BufferToTextureTargetMap for all the Processes Created 3 years, 6 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 settings.use_zero_copy = true; 526 settings.use_zero_copy = true;
527 527
528 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 528 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
529 settings.initial_debug_state.SetRecordRenderingStats( 529 settings.initial_debug_state.SetRecordRenderingStats(
530 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 530 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
531 settings.initial_debug_state.show_fps_counter = 531 settings.initial_debug_state.show_fps_counter =
532 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 532 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
533 settings.single_thread_proxy_scheduler = true; 533 settings.single_thread_proxy_scheduler = true;
534 534
535 animation_host_ = cc::AnimationHost::CreateMainInstance(); 535 animation_host_ = cc::AnimationHost::CreateMainInstance();
536 settings.resource_settings.buffer_to_texture_target_map =
537 GetBufferToTextureTargetMap();
536 538
537 cc::LayerTreeHost::InitParams params; 539 cc::LayerTreeHost::InitParams params;
538 params.client = this; 540 params.client = this;
539 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; 541 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner;
540 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 542 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
541 params.settings = &settings; 543 params.settings = &settings;
542 params.mutator_host = animation_host_.get(); 544 params.mutator_host = animation_host_.get();
543 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 545 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
544 DCHECK(!host_->IsVisible()); 546 DCHECK(!host_->IsVisible());
545 host_->SetRootLayer(root_window_->GetLayer()); 547 host_->SetRootLayer(root_window_->GetLayer());
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 } 887 }
886 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 888 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
887 frame_sink_id); 889 frame_sink_id);
888 } 890 }
889 891
890 bool CompositorImpl::HavePendingReadbacks() { 892 bool CompositorImpl::HavePendingReadbacks() {
891 return !readback_layer_tree_->children().empty(); 893 return !readback_layer_tree_->children().empty();
892 } 894 }
893 895
894 } // namespace content 896 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698