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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 12 matching lines...) Expand all
23 #include "cc/base/switches.h" 23 #include "cc/base/switches.h"
24 #include "cc/input/input_handler.h" 24 #include "cc/input/input_handler.h"
25 #include "cc/layers/layer.h" 25 #include "cc/layers/layer.h"
26 #include "cc/output/compositor_frame.h" 26 #include "cc/output/compositor_frame.h"
27 #include "cc/output/context_provider.h" 27 #include "cc/output/context_provider.h"
28 #include "cc/output/output_surface.h" 28 #include "cc/output/output_surface.h"
29 #include "cc/output/output_surface_client.h" 29 #include "cc/output/output_surface_client.h"
30 #include "cc/trees/layer_tree_host.h" 30 #include "cc/trees/layer_tree_host.h"
31 #include "content/browser/android/child_process_launcher_android.h" 31 #include "content/browser/android/child_process_launcher_android.h"
32 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 32 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
33 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
33 #include "content/browser/gpu/gpu_surface_tracker.h" 34 #include "content/browser/gpu/gpu_surface_tracker.h"
34 #include "content/browser/renderer_host/render_widget_host_impl.h" 35 #include "content/browser/renderer_host/render_widget_host_impl.h"
35 #include "content/common/gpu/client/command_buffer_proxy_impl.h" 36 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
36 #include "content/common/gpu/client/context_provider_command_buffer.h" 37 #include "content/common/gpu/client/context_provider_command_buffer.h"
37 #include "content/common/gpu/client/gl_helper.h" 38 #include "content/common/gpu/client/gl_helper.h"
38 #include "content/common/gpu/client/gpu_channel_host.h" 39 #include "content/common/gpu/client/gpu_channel_host.h"
39 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 40 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
40 #include "content/common/gpu/gpu_process_launch_causes.h" 41 #include "content/common/gpu/gpu_process_launch_causes.h"
41 #include "content/common/host_shared_bitmap_manager.h" 42 #include "content/common/host_shared_bitmap_manager.h"
42 #include "content/public/browser/android/compositor_client.h" 43 #include "content/public/browser/android/compositor_client.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 396 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
396 settings.initial_debug_state.show_fps_counter = 397 settings.initial_debug_state.show_fps_counter =
397 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 398 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
398 // TODO(enne): Update this this compositor to use the scheduler. 399 // TODO(enne): Update this this compositor to use the scheduler.
399 settings.single_thread_proxy_scheduler = false; 400 settings.single_thread_proxy_scheduler = false;
400 401
401 host_ = cc::LayerTreeHost::CreateSingleThreaded( 402 host_ = cc::LayerTreeHost::CreateSingleThreaded(
402 this, 403 this,
403 this, 404 this,
404 HostSharedBitmapManager::current(), 405 HostSharedBitmapManager::current(),
406 BrowserGpuMemoryBufferManager::current(),
405 settings, 407 settings,
406 base::MessageLoopProxy::current()); 408 base::MessageLoopProxy::current());
407 host_->SetRootLayer(root_layer_); 409 host_->SetRootLayer(root_layer_);
408 410
409 host_->SetVisible(true); 411 host_->SetVisible(true);
410 host_->SetLayerTreeHostClientReady(); 412 host_->SetLayerTreeHostClientReady();
411 host_->SetViewportSize(size_); 413 host_->SetViewportSize(size_);
412 host_->set_has_transparent_background(has_transparent_background_); 414 host_->set_has_transparent_background(has_transparent_background_);
413 host_->SetDeviceScaleFactor(device_scale_factor_); 415 host_->SetDeviceScaleFactor(device_scale_factor_);
414 ui_resource_provider_.SetLayerTreeHost(host_.get()); 416 ui_resource_provider_.SetLayerTreeHost(host_.get());
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 625 }
624 626
625 void CompositorImpl::SetNeedsAnimate() { 627 void CompositorImpl::SetNeedsAnimate() {
626 if (!host_) 628 if (!host_)
627 return; 629 return;
628 630
629 host_->SetNeedsAnimate(); 631 host_->SetNeedsAnimate();
630 } 632 }
631 633
632 } // namespace content 634 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698