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

Side by Side Diff: content/browser/compositor/delegated_frame_host.cc

Issue 316103004: Mac ÜC: Enable GPU back-pressure from the browser to the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dip
Patch Set: Simplify Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor/delegated_frame_host.h" 5 #include "content/browser/compositor/delegated_frame_host.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 // We may have had a resize while we had the lock (e.g. if the lock expired, 744 // We may have had a resize while we had the lock (e.g. if the lock expired,
745 // or if the UI still gave us some resizes), so make sure we grab a new lock 745 // or if the UI still gave us some resizes), so make sure we grab a new lock
746 // if necessary. 746 // if necessary.
747 MaybeCreateResizeLock(); 747 MaybeCreateResizeLock();
748 } 748 }
749 } 749 }
750 750
751 void DelegatedFrameHost::OnCompositingStarted( 751 void DelegatedFrameHost::OnCompositingStarted(
752 ui::Compositor* compositor, base::TimeTicks start_time) { 752 ui::Compositor* compositor, base::TimeTicks start_time) {
753 last_draw_ended_ = start_time; 753 last_draw_ended_ = start_time;
754 client_->DelegatedCompositorDidSwapBuffers();
ccameron 2014/06/05 01:31:52 This is called from SingleThreadProxy::DidSwapFram
754 } 755 }
755 756
756 void DelegatedFrameHost::OnCompositingEnded( 757 void DelegatedFrameHost::OnCompositingEnded(
757 ui::Compositor* compositor) { 758 ui::Compositor* compositor) {
758 } 759 }
759 760
760 void DelegatedFrameHost::OnCompositingAborted( 761 void DelegatedFrameHost::OnCompositingAborted(ui::Compositor* compositor) {
761 ui::Compositor* compositor) { 762 client_->DelegatedCompositorAbortedSwapBuffers();
762 } 763 }
763 764
764 void DelegatedFrameHost::OnCompositingLockStateChanged( 765 void DelegatedFrameHost::OnCompositingLockStateChanged(
765 ui::Compositor* compositor) { 766 ui::Compositor* compositor) {
766 // A compositor lock that is part of a resize lock timed out. We 767 // A compositor lock that is part of a resize lock timed out. We
767 // should display a renderer frame. 768 // should display a renderer frame.
768 if (!compositor->IsLocked() && can_lock_compositor_ == YES_DID_LOCK) { 769 if (!compositor->IsLocked() && can_lock_compositor_ == YES_DID_LOCK) {
769 can_lock_compositor_ = NO_PENDING_RENDERER_FRAME; 770 can_lock_compositor_ = NO_PENDING_RENDERER_FRAME;
770 } 771 }
771 } 772 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 // that should keep our frame. old_layer will be returned to the 876 // that should keep our frame. old_layer will be returned to the
876 // RecreateLayer caller, and should have a copy. 877 // RecreateLayer caller, and should have a copy.
877 if (frame_provider_.get()) { 878 if (frame_provider_.get()) {
878 new_layer->SetShowDelegatedContent(frame_provider_.get(), 879 new_layer->SetShowDelegatedContent(frame_provider_.get(),
879 current_frame_size_in_dip_); 880 current_frame_size_in_dip_);
880 } 881 }
881 } 882 }
882 883
883 } // namespace content 884 } // namespace content
884 885
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/renderer_host/compositing_iosurface_layer_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698