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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11854013: Use input events to improve vsync scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't set last-input-for-vsync bit on pages with touch handlers. Created 7 years, 11 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/layer_tree_host_impl.h" 5 #include "cc/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 774
775 // TODO(piman): We may need to do some validation on this ack before process ing it. 775 // TODO(piman): We may need to do some validation on this ack before process ing it.
776 m_renderer->receiveCompositorFrameAck(ack); 776 m_renderer->receiveCompositorFrameAck(ack);
777 } 777 }
778 778
779 void LayerTreeHostImpl::DidVSync(base::TimeTicks frameTime) 779 void LayerTreeHostImpl::DidVSync(base::TimeTicks frameTime)
780 { 780 {
781 m_client->didVSync(frameTime); 781 m_client->didVSync(frameTime);
782 } 782 }
783 783
784 void LayerTreeHostImpl::didReceiveLastInputEventForVSync()
785 {
786 m_client->didReceiveLastInputEventForVSync();
787 }
788
784 void LayerTreeHostImpl::OnCanDrawStateChangedForTree(LayerTreeImpl*) 789 void LayerTreeHostImpl::OnCanDrawStateChangedForTree(LayerTreeImpl*)
785 { 790 {
786 m_client->onCanDrawStateChanged(canDraw()); 791 m_client->onCanDrawStateChanged(canDraw());
787 } 792 }
788 793
789 CompositorFrameMetadata LayerTreeHostImpl::makeCompositorFrameMetadata() const 794 CompositorFrameMetadata LayerTreeHostImpl::makeCompositorFrameMetadata() const
790 { 795 {
791 if (!rootScrollLayer()) 796 if (!rootScrollLayer())
792 return CompositorFrameMetadata(); 797 return CompositorFrameMetadata();
793 798
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 } 1661 }
1657 1662
1658 skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture() 1663 skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
1659 { 1664 {
1660 LayerTreeImpl* tree = pendingTree() ? pendingTree() : activeTree(); 1665 LayerTreeImpl* tree = pendingTree() ? pendingTree() : activeTree();
1661 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); 1666 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer());
1662 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); 1667 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
1663 } 1668 }
1664 1669
1665 } // namespace cc 1670 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698