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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 CommandBufferProxyImpl* GetCommandBufferProxy() { 110 CommandBufferProxyImpl* GetCommandBufferProxy() {
111 ContextProviderCommandBuffer* provider_command_buffer = 111 ContextProviderCommandBuffer* provider_command_buffer =
112 static_cast<content::ContextProviderCommandBuffer*>( 112 static_cast<content::ContextProviderCommandBuffer*>(
113 context_provider_.get()); 113 context_provider_.get());
114 CommandBufferProxyImpl* command_buffer_proxy = 114 CommandBufferProxyImpl* command_buffer_proxy =
115 provider_command_buffer->GetCommandBufferProxy(); 115 provider_command_buffer->GetCommandBufferProxy();
116 DCHECK(command_buffer_proxy); 116 DCHECK(command_buffer_proxy);
117 return command_buffer_proxy; 117 return command_buffer_proxy;
118 } 118 }
119 119
120 void OnSwapBuffersCompleted( 120 void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info,
121 const std::vector<ui::LatencyInfo>& latency_info) { 121 int result) {
122 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 122 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
123 OutputSurface::OnSwapBuffersComplete(); 123 OutputSurface::OnSwapBuffersComplete();
124 } 124 }
125 125
126 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&)> 126 base::CancelableCallback<void(const std::vector<ui::LatencyInfo>&, int)>
127 swap_buffers_completion_callback_; 127 swap_buffers_completion_callback_;
128 128
129 scoped_refptr<base::MessageLoopProxy> main_thread_; 129 scoped_refptr<base::MessageLoopProxy> main_thread_;
130 base::WeakPtr<CompositorImpl> compositor_impl_; 130 base::WeakPtr<CompositorImpl> compositor_impl_;
131 }; 131 };
132 132
133 static bool g_initialized = false; 133 static bool g_initialized = false;
134 134
135 bool g_use_surface_manager = false; 135 bool g_use_surface_manager = false;
136 base::LazyInstance<cc::SurfaceManager> g_surface_manager = 136 base::LazyInstance<cc::SurfaceManager> g_surface_manager =
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 723
724 void CompositorImpl::SetNeedsAnimate() { 724 void CompositorImpl::SetNeedsAnimate() {
725 needs_animate_ = true; 725 needs_animate_ = true;
726 if (!host_) 726 if (!host_)
727 return; 727 return;
728 728
729 host_->SetNeedsAnimate(); 729 host_->SetNeedsAnimate();
730 } 730 }
731 731
732 } // namespace content 732 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698