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

Side by Side Diff: Source/web/WebKit.cpp

Issue 251183006: Web Animations: Timeline should not advance during task execution (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use task start time Created 6 years, 7 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "public/web/WebKit.h" 32 #include "public/web/WebKit.h"
33 33
34 #include "RuntimeEnabledFeatures.h" 34 #include "RuntimeEnabledFeatures.h"
35 #include "bindings/v8/V8Binding.h" 35 #include "bindings/v8/V8Binding.h"
36 #include "bindings/v8/V8Initializer.h" 36 #include "bindings/v8/V8Initializer.h"
37 #include "core/Init.h" 37 #include "core/Init.h"
38 #include "core/animation/AnimationClock.h"
38 #include "core/dom/Microtask.h" 39 #include "core/dom/Microtask.h"
39 #include "core/frame/Settings.h" 40 #include "core/frame/Settings.h"
40 #include "core/page/Page.h" 41 #include "core/page/Page.h"
41 #include "core/workers/WorkerGlobalScopeProxy.h" 42 #include "core/workers/WorkerGlobalScopeProxy.h"
42 #include "gin/public/v8_platform.h" 43 #include "gin/public/v8_platform.h"
43 #include "platform/LayoutTestSupport.h" 44 #include "platform/LayoutTestSupport.h"
44 #include "platform/Logging.h" 45 #include "platform/Logging.h"
45 #include "platform/graphics/ImageDecodingStore.h" 46 #include "platform/graphics/ImageDecodingStore.h"
46 #include "platform/graphics/media/MediaPlayer.h" 47 #include "platform/graphics/media/MediaPlayer.h"
47 #include "platform/heap/Heap.h" 48 #include "platform/heap/Heap.h"
48 #include "platform/heap/glue/MessageLoopInterruptor.h" 49 #include "platform/heap/glue/MessageLoopInterruptor.h"
49 #include "platform/heap/glue/PendingGCRunner.h" 50 #include "platform/heap/glue/PendingGCRunner.h"
50 #include "public/platform/Platform.h" 51 #include "public/platform/Platform.h"
51 #include "public/platform/WebPrerenderingSupport.h" 52 #include "public/platform/WebPrerenderingSupport.h"
52 #include "public/platform/WebThread.h" 53 #include "public/platform/WebThread.h"
53 #include "web/IndexedDBClientImpl.h" 54 #include "web/IndexedDBClientImpl.h"
54 #include "web/WebMediaPlayerClientImpl.h" 55 #include "web/WebMediaPlayerClientImpl.h"
55 #include "wtf/Assertions.h" 56 #include "wtf/Assertions.h"
56 #include "wtf/CryptographicallyRandomNumber.h" 57 #include "wtf/CryptographicallyRandomNumber.h"
57 #include "wtf/MainThread.h" 58 #include "wtf/MainThread.h"
58 #include "wtf/WTF.h" 59 #include "wtf/WTF.h"
59 #include "wtf/text/AtomicString.h" 60 #include "wtf/text/AtomicString.h"
60 #include "wtf/text/TextEncoding.h" 61 #include "wtf/text/TextEncoding.h"
61 #include <v8.h> 62 #include <v8.h>
62 63
63 namespace blink { 64 namespace blink {
64 65
65 namespace { 66 namespace {
66 67
67 class EndOfTaskRunner : public WebThread::TaskObserver { 68 class EndOfTaskRunner : public WebThread::TaskObserver {
dstockwell 2014/04/30 12:07:22 We probably want to rename this, or create a separ
68 public: 69 public:
69 virtual void willProcessTask() { } 70 virtual void willProcessTask()
71 {
72 WebCore::AnimationClock::notifyTaskStartTime(monotonicallyIncreasingTime ());
esprehn 2014/04/30 22:43:50 How expensive is monotonicallyIncreasingTime? Can
dstockwell 2014/04/30 22:59:51 I will investigate.
73 }
abarth-chromium 2014/04/30 22:39:16 Doesn't this make the entire engine slower? We ex
dstockwell 2014/05/01 00:22:21 I'm going to try a new approach which should reduc
70 virtual void didProcessTask() 74 virtual void didProcessTask()
71 { 75 {
72 WebCore::Microtask::performCheckpoint(); 76 WebCore::Microtask::performCheckpoint();
73 } 77 }
74 }; 78 };
75 79
76 } // namespace 80 } // namespace
77 81
78 static WebThread::TaskObserver* s_endOfTaskRunner = 0; 82 static WebThread::TaskObserver* s_endOfTaskRunner = 0;
79 static WebThread::TaskObserver* s_pendingGCRunner = 0; 83 static WebThread::TaskObserver* s_pendingGCRunner = 0;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 channel->state = WTFLogChannelOn; 263 channel->state = WTFLogChannelOn;
260 #endif // !LOG_DISABLED 264 #endif // !LOG_DISABLED
261 } 265 }
262 266
263 void resetPluginCache(bool reloadPages) 267 void resetPluginCache(bool reloadPages)
264 { 268 {
265 WebCore::Page::refreshPlugins(reloadPages); 269 WebCore::Page::refreshPlugins(reloadPages);
266 } 270 }
267 271
268 } // namespace blink 272 } // namespace blink
OLDNEW
« Source/core/animation/AnimationClockTest.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698