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

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

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: swapsinglethread: fix-name-in-browsertest Created 4 years, 1 month 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 void CompositorImpl::DeleteUIResource(cc::UIResourceId resource_id) { 768 void CompositorImpl::DeleteUIResource(cc::UIResourceId resource_id) {
769 TRACE_EVENT0("compositor", "CompositorImpl::DeleteUIResource"); 769 TRACE_EVENT0("compositor", "CompositorImpl::DeleteUIResource");
770 host_->GetUIResourceManager()->DeleteUIResource(resource_id); 770 host_->GetUIResourceManager()->DeleteUIResource(resource_id);
771 } 771 }
772 772
773 bool CompositorImpl::SupportsETC1NonPowerOfTwo() const { 773 bool CompositorImpl::SupportsETC1NonPowerOfTwo() const {
774 return gpu_capabilities_.texture_format_etc1_npot; 774 return gpu_capabilities_.texture_format_etc1_npot;
775 } 775 }
776 776
777 void CompositorImpl::DidPostSwapBuffers() { 777 void CompositorImpl::DidSubmitCompositorFrame() {
778 TRACE_EVENT0("compositor", "CompositorImpl::DidPostSwapBuffers"); 778 TRACE_EVENT0("compositor", "CompositorImpl::DidSubmitCompositorFrame");
779 pending_swapbuffers_++; 779 pending_swapbuffers_++;
780 } 780 }
781 781
782 void CompositorImpl::DidReceiveCompositorFrameAck() { 782 void CompositorImpl::DidReceiveCompositorFrameAck() {
783 TRACE_EVENT0("compositor", "CompositorImpl::DidReceiveCompositorFrameAck"); 783 TRACE_EVENT0("compositor", "CompositorImpl::DidReceiveCompositorFrameAck");
784 DCHECK_GT(pending_swapbuffers_, 0U); 784 DCHECK_GT(pending_swapbuffers_, 0U);
785 pending_swapbuffers_--; 785 pending_swapbuffers_--;
786 client_->OnSwapBuffersCompleted(pending_swapbuffers_); 786 client_->OnSwapBuffersCompleted(pending_swapbuffers_);
787 } 787 }
788 788
789 void CompositorImpl::DidAbortSwapBuffers() { 789 void CompositorImpl::DidLoseCompositorFrameSink() {
790 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); 790 TRACE_EVENT0("compositor", "CompositorImpl::DidLoseCompositorFrameSink");
791 // This really gets called only once from
792 // SingleThreadProxy::DidLoseCompositorFrameSinkOnImplThread() when the
793 // context was lost.
794 if (host_->IsVisible())
795 host_->SetNeedsCommit();
796 client_->OnSwapBuffersCompleted(0); 791 client_->OnSwapBuffersCompleted(0);
797 } 792 }
798 793
799 void CompositorImpl::DidCommit() { 794 void CompositorImpl::DidCommit() {
800 root_window_->OnCompositingDidCommit(); 795 root_window_->OnCompositingDidCommit();
801 } 796 }
802 797
803 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { 798 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) {
804 readback_layer_tree_->AddChild(layer); 799 readback_layer_tree_->AddChild(layer);
805 } 800 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 832
838 cc::FrameSinkId CompositorImpl::GetFrameSinkId() { 833 cc::FrameSinkId CompositorImpl::GetFrameSinkId() {
839 return frame_sink_id_; 834 return frame_sink_id_;
840 } 835 }
841 836
842 bool CompositorImpl::HavePendingReadbacks() { 837 bool CompositorImpl::HavePendingReadbacks() {
843 return !readback_layer_tree_->children().empty(); 838 return !readback_layer_tree_->children().empty();
844 } 839 }
845 840
846 } // namespace content 841 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.h ('k') | content/browser/renderer_host/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698