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

Side by Side Diff: ui/compositor/compositor.cc

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up Created 7 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 | Annotate | Revision Log
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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 FOR_EACH_OBSERVER(CompositorObserver, 751 FOR_EACH_OBSERVER(CompositorObserver,
752 observer_list_, 752 observer_list_,
753 OnCompositingDidCommit(this)); 753 OnCompositingDidCommit(this));
754 } 754 }
755 755
756 void Compositor::DidCommitAndDrawFrame() { 756 void Compositor::DidCommitAndDrawFrame() {
757 base::TimeTicks start_time = base::TimeTicks::Now(); 757 base::TimeTicks start_time = base::TimeTicks::Now();
758 FOR_EACH_OBSERVER(CompositorObserver, 758 FOR_EACH_OBSERVER(CompositorObserver,
759 observer_list_, 759 observer_list_,
760 OnCompositingStarted(this, start_time)); 760 OnCompositingStarted(this, start_time));
761 // If we're threaded without a swap complete callback, we have to
762 // call DidCompleteSwapBuffersManually.
763 if (g_compositor_thread &&
764 !host_->GetRendererCapabilities().using_swap_complete_callback)
765 DidCompleteSwapBuffers();
766 } 761 }
767 762
768 void Compositor::DidCompleteSwapBuffers() { 763 void Compositor::DidCompleteSwapBuffers() {
769 DCHECK(g_compositor_thread); 764 DCHECK(g_compositor_thread);
770 NotifyEnd(); 765 NotifyEnd();
771 } 766 }
772 767
773 void Compositor::ScheduleComposite() { 768 void Compositor::ScheduleComposite() {
774 if (!disable_schedule_composite_) 769 if (!disable_schedule_composite_)
775 ScheduleDraw(); 770 ScheduleDraw();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 COMPOSITOR_EXPORT void DisableTestCompositor() { 841 COMPOSITOR_EXPORT void DisableTestCompositor() {
847 ResetImplicitFactory(); 842 ResetImplicitFactory();
848 g_test_compositor_enabled = false; 843 g_test_compositor_enabled = false;
849 } 844 }
850 845
851 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 846 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
852 return g_test_compositor_enabled; 847 return g_test_compositor_enabled;
853 } 848 }
854 849
855 } // namespace ui 850 } // namespace ui
OLDNEW
« content/renderer/render_widget.cc ('K') | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698