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

Side by Side Diff: cc/layer_tree_host.cc

Issue 12453010: Allow impl-only animations, and return opacity values via AnimationEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } 880 }
881 } 881 }
882 882
883 void LayerTreeHost::setAnimationEventsRecursive(const AnimationEventsVector& eve nts, Layer* layer, base::Time wallClockTime) 883 void LayerTreeHost::setAnimationEventsRecursive(const AnimationEventsVector& eve nts, Layer* layer, base::Time wallClockTime)
884 { 884 {
885 if (!layer) 885 if (!layer)
886 return; 886 return;
887 887
888 for (size_t eventIndex = 0; eventIndex < events.size(); ++eventIndex) { 888 for (size_t eventIndex = 0; eventIndex < events.size(); ++eventIndex) {
889 if (layer->id() == events[eventIndex].layerId) { 889 if (layer->id() == events[eventIndex].layerId) {
890 if (events[eventIndex].type == AnimationEvent::Started) 890 switch (events[eventIndex].type) {
891 case AnimationEvent::Started :
891 layer->notifyAnimationStarted(events[eventIndex], wallClockTime. ToDoubleT()); 892 layer->notifyAnimationStarted(events[eventIndex], wallClockTime. ToDoubleT());
892 else 893 break;
894
895 case AnimationEvent::Finished :
893 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 896 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
897 break;
898
899 case AnimationEvent::PropertyUpdate :
900 layer->notifyAnimationPropertyUpdate(events[eventIndex]);
901 break;
902
903 default:
904 NOTREACHED();
905 }
894 } 906 }
895 } 907 }
896 908
897 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 909 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
898 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 910 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
899 } 911 }
900 912
901 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 913 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
902 { 914 {
903 return m_proxy->capturePicture(); 915 return m_proxy->capturePicture();
904 } 916 }
905 917
906 } // namespace cc 918 } // namespace cc
OLDNEW
« cc/layer_animation_controller_unittest.cc ('K') | « cc/layer_animation_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698