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

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

Issue 2771053003: WIP: Plumbing input event latency reporting through Mus GPU.
Patch Set: NON_EXPORTED_BASE 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 overlay_candidate_validator_( 223 overlay_candidate_validator_(
224 new display_compositor:: 224 new display_compositor::
225 CompositorOverlayCandidateValidatorAndroid()), 225 CompositorOverlayCandidateValidatorAndroid()),
226 weak_ptr_factory_(this) { 226 weak_ptr_factory_(this) {
227 capabilities_.max_frames_pending = kMaxDisplaySwapBuffers; 227 capabilities_.max_frames_pending = kMaxDisplaySwapBuffers;
228 } 228 }
229 229
230 ~AndroidOutputSurface() override = default; 230 ~AndroidOutputSurface() override = default;
231 231
232 void SwapBuffers(cc::OutputSurfaceFrame frame) override { 232 void SwapBuffers(cc::OutputSurfaceFrame frame) override {
233 GetCommandBufferProxy()->SetLatencyInfo(frame.latency_info); 233 GetCommandBufferProxy()->AddLatencyInfo(frame.latency_info);
234 if (frame.sub_buffer_rect) { 234 if (frame.sub_buffer_rect) {
235 DCHECK(frame.sub_buffer_rect->IsEmpty()); 235 DCHECK(frame.sub_buffer_rect->IsEmpty());
236 context_provider_->ContextSupport()->CommitOverlayPlanes(); 236 context_provider_->ContextSupport()->CommitOverlayPlanes();
237 } else { 237 } else {
238 context_provider_->ContextSupport()->Swap(); 238 context_provider_->ContextSupport()->Swap();
239 } 239 }
240 } 240 }
241 241
242 void BindToClient(cc::OutputSurfaceClient* client) override { 242 void BindToClient(cc::OutputSurfaceClient* client) override {
243 DCHECK(client); 243 DCHECK(client);
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 } 862 }
863 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 863 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
864 frame_sink_id); 864 frame_sink_id);
865 } 865 }
866 866
867 bool CompositorImpl::HavePendingReadbacks() { 867 bool CompositorImpl::HavePendingReadbacks() {
868 return !readback_layer_tree_->children().empty(); 868 return !readback_layer_tree_->children().empty();
869 } 869 }
870 870
871 } // namespace content 871 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/DEPS ('k') | content/browser/renderer_host/input/render_widget_host_latency_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698