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

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

Issue 2788893004: Renaming gpu swap buffer callbacks and the screenshot latency component. (Closed)
Patch Set: Updating android compositor Created 3 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 #include <stdint.h> 9 #include <stdint.h>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 gpu::CommandBufferProxyImpl* command_buffer_proxy = 292 gpu::CommandBufferProxyImpl* command_buffer_proxy =
293 provider_command_buffer->GetCommandBufferProxy(); 293 provider_command_buffer->GetCommandBufferProxy();
294 DCHECK(command_buffer_proxy); 294 DCHECK(command_buffer_proxy);
295 return command_buffer_proxy; 295 return command_buffer_proxy;
296 } 296 }
297 297
298 void OnSwapBuffersCompleted( 298 void OnSwapBuffersCompleted(
299 const std::vector<ui::LatencyInfo>& latency_info, 299 const std::vector<ui::LatencyInfo>& latency_info,
300 gfx::SwapResult result, 300 gfx::SwapResult result,
301 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { 301 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
302 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 302 RenderWidgetHostImpl::OnGpuSwapBuffersCompleted(latency_info);
303 client_->DidReceiveSwapBuffersAck(); 303 client_->DidReceiveSwapBuffersAck();
304 swap_buffers_callback_.Run(); 304 swap_buffers_callback_.Run();
305 } 305 }
306 306
307 private: 307 private:
308 cc::OutputSurfaceClient* client_ = nullptr; 308 cc::OutputSurfaceClient* client_ = nullptr;
309 base::Closure swap_buffers_callback_; 309 base::Closure swap_buffers_callback_;
310 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_; 310 std::unique_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator_;
311 base::WeakPtrFactory<AndroidOutputSurface> weak_ptr_factory_; 311 base::WeakPtrFactory<AndroidOutputSurface> weak_ptr_factory_;
312 }; 312 };
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 861 }
862 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 862 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
863 frame_sink_id); 863 frame_sink_id);
864 } 864 }
865 865
866 bool CompositorImpl::HavePendingReadbacks() { 866 bool CompositorImpl::HavePendingReadbacks() {
867 return !readback_layer_tree_->children().empty(); 867 return !readback_layer_tree_->children().empty();
868 } 868 }
869 869
870 } // namespace content 870 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698