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

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

Issue 2757373002: Fixing flakiness of TextureLayerChangeInvisibleMailboxTest (Closed)
Patch Set: Drop ack if CFS is gone 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
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | no next file » | 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 #include <stdint.h> 9 #include <stdint.h>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 return gpu_capabilities_.texture_format_etc1_npot; 799 return gpu_capabilities_.texture_format_etc1_npot;
800 } 800 }
801 801
802 void CompositorImpl::DidSubmitCompositorFrame() { 802 void CompositorImpl::DidSubmitCompositorFrame() {
803 TRACE_EVENT0("compositor", "CompositorImpl::DidSubmitCompositorFrame"); 803 TRACE_EVENT0("compositor", "CompositorImpl::DidSubmitCompositorFrame");
804 pending_frames_++; 804 pending_frames_++;
805 } 805 }
806 806
807 void CompositorImpl::DidReceiveCompositorFrameAck() { 807 void CompositorImpl::DidReceiveCompositorFrameAck() {
808 TRACE_EVENT0("compositor", "CompositorImpl::DidReceiveCompositorFrameAck"); 808 TRACE_EVENT0("compositor", "CompositorImpl::DidReceiveCompositorFrameAck");
809 if (!has_compositor_frame_sink_)
danakj 2017/04/04 22:14:47 This would be racey if CompositorImpl can has_comp
Saman Sami 2017/04/04 22:23:47 Interesting. No, it's not obvious to me why it won
810 return;
809 DCHECK_GT(pending_frames_, 0U); 811 DCHECK_GT(pending_frames_, 0U);
810 pending_frames_--; 812 pending_frames_--;
811 client_->DidSwapFrame(pending_frames_); 813 client_->DidSwapFrame(pending_frames_);
812 } 814 }
813 815
814 void CompositorImpl::DidLoseCompositorFrameSink() { 816 void CompositorImpl::DidLoseCompositorFrameSink() {
815 TRACE_EVENT0("compositor", "CompositorImpl::DidLoseCompositorFrameSink"); 817 TRACE_EVENT0("compositor", "CompositorImpl::DidLoseCompositorFrameSink");
816 has_compositor_frame_sink_ = false; 818 has_compositor_frame_sink_ = false;
817 client_->DidSwapFrame(0); 819 client_->DidSwapFrame(0);
818 } 820 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 863 }
862 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, 864 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_,
863 frame_sink_id); 865 frame_sink_id);
864 } 866 }
865 867
866 bool CompositorImpl::HavePendingReadbacks() { 868 bool CompositorImpl::HavePendingReadbacks() {
867 return !readback_layer_tree_->children().empty(); 869 return !readback_layer_tree_->children().empty();
868 } 870 }
869 871
870 } // namespace content 872 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698