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

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

Issue 577273003: Add new latency_info for tracking browser composite time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sievers Review 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 OutputSurfaceWithoutParent(const scoped_refptr< 59 OutputSurfaceWithoutParent(const scoped_refptr<
60 content::ContextProviderCommandBuffer>& context_provider, 60 content::ContextProviderCommandBuffer>& context_provider,
61 base::WeakPtr<content::CompositorImpl> compositor_impl) 61 base::WeakPtr<content::CompositorImpl> compositor_impl)
62 : cc::OutputSurface(context_provider) { 62 : cc::OutputSurface(context_provider) {
63 capabilities_.adjust_deadline_for_parent = false; 63 capabilities_.adjust_deadline_for_parent = false;
64 compositor_impl_ = compositor_impl; 64 compositor_impl_ = compositor_impl;
65 main_thread_ = base::MessageLoopProxy::current(); 65 main_thread_ = base::MessageLoopProxy::current();
66 } 66 }
67 67
68 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE { 68 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE {
69 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) {
70 frame->metadata.latency_info[i].AddLatencyNumber(
71 ui::INPUT_EVENT_BROWSER_SWAP_BUFFER_COMPONENT, 0, 0);
72 }
73
69 content::ContextProviderCommandBuffer* provider_command_buffer = 74 content::ContextProviderCommandBuffer* provider_command_buffer =
70 static_cast<content::ContextProviderCommandBuffer*>( 75 static_cast<content::ContextProviderCommandBuffer*>(
71 context_provider_.get()); 76 context_provider_.get());
72 content::CommandBufferProxyImpl* command_buffer_proxy = 77 content::CommandBufferProxyImpl* command_buffer_proxy =
73 provider_command_buffer->GetCommandBufferProxy(); 78 provider_command_buffer->GetCommandBufferProxy();
74 DCHECK(command_buffer_proxy); 79 DCHECK(command_buffer_proxy);
75 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info); 80 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info);
76 81
77 OutputSurface::SwapBuffers(frame); 82 OutputSurface::SwapBuffers(frame);
78 } 83 }
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 } 687 }
683 688
684 void CompositorImpl::SetNeedsAnimate() { 689 void CompositorImpl::SetNeedsAnimate() {
685 if (!host_) 690 if (!host_)
686 return; 691 return;
687 692
688 host_->SetNeedsAnimate(); 693 host_->SetNeedsAnimate();
689 } 694 }
690 695
691 } // namespace content 696 } // namespace content
OLDNEW
« no previous file with comments | « cc/base/rolling_time_delta_history.cc ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698