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

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

Issue 1147143003: android: Browser compositor use_zero_copy upload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void CompositorImpl::CreateLayerTreeHost() { 405 void CompositorImpl::CreateLayerTreeHost() {
406 DCHECK(!host_); 406 DCHECK(!host_);
407 DCHECK(!WillCompositeThisFrame()); 407 DCHECK(!WillCompositeThisFrame());
408 needs_composite_ = false; 408 needs_composite_ = false;
409 pending_swapbuffers_ = 0; 409 pending_swapbuffers_ = 0;
410 cc::LayerTreeSettings settings; 410 cc::LayerTreeSettings settings;
411 settings.renderer_settings.refresh_rate = 60.0; 411 settings.renderer_settings.refresh_rate = 60.0;
412 settings.renderer_settings.allow_antialiasing = false; 412 settings.renderer_settings.allow_antialiasing = false;
413 settings.renderer_settings.highp_threshold_min = 2048; 413 settings.renderer_settings.highp_threshold_min = 2048;
414 settings.impl_side_painting = true; 414 settings.impl_side_painting = true;
415 settings.use_zero_copy = true;
415 416
416 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 417 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
417 settings.initial_debug_state.SetRecordRenderingStats( 418 settings.initial_debug_state.SetRecordRenderingStats(
418 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 419 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
419 settings.initial_debug_state.show_fps_counter = 420 settings.initial_debug_state.show_fps_counter =
420 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 421 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
421 // TODO(enne): Update this this compositor to use the scheduler. 422 // TODO(enne): Update this this compositor to use the scheduler.
422 settings.single_thread_proxy_scheduler = false; 423 settings.single_thread_proxy_scheduler = false;
423 424
424 cc::LayerTreeHost::InitParams params; 425 cc::LayerTreeHost::InitParams params;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 734
734 void CompositorImpl::SetNeedsAnimate() { 735 void CompositorImpl::SetNeedsAnimate() {
735 needs_animate_ = true; 736 needs_animate_ = true;
736 if (!host_) 737 if (!host_)
737 return; 738 return;
738 739
739 host_->SetNeedsAnimate(); 740 host_->SetNeedsAnimate();
740 } 741 }
741 742
742 } // namespace content 743 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698