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

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

Issue 1032703002: Trace background/visibility events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renderer_host Created 5 years, 9 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 | content/browser/renderer_host/render_process_host_impl.cc » ('j') | 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 host_->SetLayerTreeHostClientReady(); 429 host_->SetLayerTreeHostClientReady();
430 host_->SetViewportSize(size_); 430 host_->SetViewportSize(size_);
431 host_->set_has_transparent_background(has_transparent_background_); 431 host_->set_has_transparent_background(has_transparent_background_);
432 host_->SetDeviceScaleFactor(device_scale_factor_); 432 host_->SetDeviceScaleFactor(device_scale_factor_);
433 433
434 if (needs_animate_) 434 if (needs_animate_)
435 host_->SetNeedsAnimate(); 435 host_->SetNeedsAnimate();
436 } 436 }
437 437
438 void CompositorImpl::SetVisible(bool visible) { 438 void CompositorImpl::SetVisible(bool visible) {
439 TRACE_EVENT1("cc", "CompositorImpl::SetVisible", "visible", visible);
439 if (!visible) { 440 if (!visible) {
440 DCHECK(host_); 441 DCHECK(host_);
441 // Look for any layers that were attached to the root for readback 442 // Look for any layers that were attached to the root for readback
442 // and are waiting for Composite() to happen. 443 // and are waiting for Composite() to happen.
443 bool readback_pending = false; 444 bool readback_pending = false;
444 for (size_t i = 0; i < root_layer_->children().size(); ++i) { 445 for (size_t i = 0; i < root_layer_->children().size(); ++i) {
445 if (root_layer_->children()[i]->HasCopyRequest()) { 446 if (root_layer_->children()[i]->HasCopyRequest()) {
446 readback_pending = true; 447 readback_pending = true;
447 break; 448 break;
448 } 449 }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 720
720 void CompositorImpl::SetNeedsAnimate() { 721 void CompositorImpl::SetNeedsAnimate() {
721 needs_animate_ = true; 722 needs_animate_ = true;
722 if (!host_) 723 if (!host_)
723 return; 724 return;
724 725
725 host_->SetNeedsAnimate(); 726 host_->SetNeedsAnimate();
726 } 727 }
727 728
728 } // namespace content 729 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698