| OLD | NEW |
| 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/scheduler/scheduler.h" | 5 #include "cc/scheduler/scheduler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks()); | 329 scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks()); |
| 330 scheduler_->NotifyReadyToCommit(); | 330 scheduler_->NotifyReadyToCommit(); |
| 331 scheduler_->NotifyReadyToActivate(); | 331 scheduler_->NotifyReadyToActivate(); |
| 332 scheduler_->NotifyReadyToDraw(); | 332 scheduler_->NotifyReadyToDraw(); |
| 333 | 333 |
| 334 EXPECT_FALSE(scheduler_->CommitPending()); | 334 EXPECT_FALSE(scheduler_->CommitPending()); |
| 335 | 335 |
| 336 if (scheduler_settings_.using_synchronous_renderer_compositor) { | 336 if (scheduler_settings_.using_synchronous_renderer_compositor) { |
| 337 scheduler_->SetNeedsRedraw(); | 337 scheduler_->SetNeedsRedraw(); |
| 338 scheduler_->OnDrawForOutputSurface(); | 338 bool resourceless_software_draw = false; |
| 339 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 339 } else { | 340 } else { |
| 340 // Run the posted deadline task. | 341 // Run the posted deadline task. |
| 341 EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending()); | 342 EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending()); |
| 342 task_runner_->RunTasksWhile(client_->ImplFrameDeadlinePending(true)); | 343 task_runner_->RunTasksWhile(client_->ImplFrameDeadlinePending(true)); |
| 343 } | 344 } |
| 344 | 345 |
| 345 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 346 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 346 } | 347 } |
| 347 | 348 |
| 348 client_->Reset(); | 349 client_->Reset(); |
| (...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3084 | 3085 |
| 3085 // Next vsync. | 3086 // Next vsync. |
| 3086 AdvanceFrame(); | 3087 AdvanceFrame(); |
| 3087 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3088 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3088 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3089 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3089 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3090 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3090 client_->Reset(); | 3091 client_->Reset(); |
| 3091 | 3092 |
| 3092 // Android onDraw. This doesn't consume the single begin frame request. | 3093 // Android onDraw. This doesn't consume the single begin frame request. |
| 3093 scheduler_->SetNeedsRedraw(); | 3094 scheduler_->SetNeedsRedraw(); |
| 3094 scheduler_->OnDrawForOutputSurface(); | 3095 bool resourceless_software_draw = false; |
| 3096 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3095 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); | 3097 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); |
| 3096 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3098 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3097 client_->Reset(); | 3099 client_->Reset(); |
| 3098 | 3100 |
| 3099 // The animation inside of WillBeginImplFrame changes stuff on the screen, but | 3101 // The animation inside of WillBeginImplFrame changes stuff on the screen, but |
| 3100 // ends here, so does not cause another frame to happen. | 3102 // ends here, so does not cause another frame to happen. |
| 3101 client_->SetWillBeginImplFrameCausesRedraw(true); | 3103 client_->SetWillBeginImplFrameCausesRedraw(true); |
| 3102 | 3104 |
| 3103 // Next vsync. | 3105 // Next vsync. |
| 3104 AdvanceFrame(); | 3106 AdvanceFrame(); |
| 3105 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3107 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3106 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3108 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3107 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3109 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3108 client_->Reset(); | 3110 client_->Reset(); |
| 3109 | 3111 |
| 3110 // Android onDraw. | 3112 // Android onDraw. |
| 3111 scheduler_->SetNeedsRedraw(); | 3113 scheduler_->SetNeedsRedraw(); |
| 3112 scheduler_->OnDrawForOutputSurface(); | 3114 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3113 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); | 3115 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); |
| 3114 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3116 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3115 client_->Reset(); | 3117 client_->Reset(); |
| 3116 | 3118 |
| 3117 // Idle on next vsync, as the animation has completed. | 3119 // Idle on next vsync, as the animation has completed. |
| 3118 AdvanceFrame(); | 3120 AdvanceFrame(); |
| 3119 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); | 3121 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); |
| 3120 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); | 3122 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); |
| 3121 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); | 3123 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); |
| 3122 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3124 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3123 client_->Reset(); | 3125 client_->Reset(); |
| 3124 } | 3126 } |
| 3125 | 3127 |
| 3126 TEST_F(SchedulerTest, SynchronousCompositorOnDrawDuringIdle) { | 3128 TEST_F(SchedulerTest, SynchronousCompositorOnDrawDuringIdle) { |
| 3127 scheduler_settings_.using_synchronous_renderer_compositor = true; | 3129 scheduler_settings_.using_synchronous_renderer_compositor = true; |
| 3128 scheduler_settings_.use_external_begin_frame_source = true; | 3130 scheduler_settings_.use_external_begin_frame_source = true; |
| 3129 SetUpScheduler(true); | 3131 SetUpScheduler(true); |
| 3130 | 3132 |
| 3131 scheduler_->SetNeedsRedraw(); | 3133 scheduler_->SetNeedsRedraw(); |
| 3132 scheduler_->OnDrawForOutputSurface(); | 3134 bool resourceless_software_draw = false; |
| 3135 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3133 EXPECT_ACTION("SetNeedsBeginFrames(true)", client_, 0, 2); | 3136 EXPECT_ACTION("SetNeedsBeginFrames(true)", client_, 0, 2); |
| 3134 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 1, 2); | 3137 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 1, 2); |
| 3135 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3138 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3136 client_->Reset(); | 3139 client_->Reset(); |
| 3137 | 3140 |
| 3138 // Idle on next vsync. | 3141 // Idle on next vsync. |
| 3139 AdvanceFrame(); | 3142 AdvanceFrame(); |
| 3140 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); | 3143 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); |
| 3141 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); | 3144 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); |
| 3142 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); | 3145 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 | 3220 |
| 3218 // Next vsync. | 3221 // Next vsync. |
| 3219 AdvanceFrame(); | 3222 AdvanceFrame(); |
| 3220 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3223 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3221 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3224 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3222 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3225 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3223 client_->Reset(); | 3226 client_->Reset(); |
| 3224 | 3227 |
| 3225 // Android onDraw. | 3228 // Android onDraw. |
| 3226 scheduler_->SetNeedsRedraw(); | 3229 scheduler_->SetNeedsRedraw(); |
| 3227 scheduler_->OnDrawForOutputSurface(); | 3230 bool resourceless_software_draw = false; |
| 3231 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3228 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); | 3232 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); |
| 3229 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3233 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3230 client_->Reset(); | 3234 client_->Reset(); |
| 3231 | 3235 |
| 3232 // Idle on next vsync. | 3236 // Idle on next vsync. |
| 3233 AdvanceFrame(); | 3237 AdvanceFrame(); |
| 3234 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); | 3238 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); |
| 3235 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); | 3239 EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); |
| 3236 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); | 3240 EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); |
| 3237 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3241 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3308 client_->Reset(); | 3312 client_->Reset(); |
| 3309 | 3313 |
| 3310 // Next vsync. | 3314 // Next vsync. |
| 3311 EXPECT_SCOPED(AdvanceFrame()); | 3315 EXPECT_SCOPED(AdvanceFrame()); |
| 3312 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3316 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3313 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3317 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3314 client_->Reset(); | 3318 client_->Reset(); |
| 3315 | 3319 |
| 3316 // Android onDraw. | 3320 // Android onDraw. |
| 3317 scheduler_->SetNeedsRedraw(); | 3321 scheduler_->SetNeedsRedraw(); |
| 3318 scheduler_->OnDrawForOutputSurface(); | 3322 bool resourceless_software_draw = false; |
| 3323 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3319 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); | 3324 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); |
| 3320 EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); | 3325 EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); |
| 3321 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3326 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3322 EXPECT_FALSE(scheduler_->PrepareTilesPending()); | 3327 EXPECT_FALSE(scheduler_->PrepareTilesPending()); |
| 3323 client_->Reset(); | 3328 client_->Reset(); |
| 3324 | 3329 |
| 3325 // Android onDraw. | 3330 // Android onDraw. |
| 3326 scheduler_->SetNeedsRedraw(); | 3331 scheduler_->SetNeedsRedraw(); |
| 3327 scheduler_->OnDrawForOutputSurface(); | 3332 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3328 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); | 3333 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); |
| 3329 EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); | 3334 EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); |
| 3330 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3335 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3331 EXPECT_FALSE(scheduler_->PrepareTilesPending()); | 3336 EXPECT_FALSE(scheduler_->PrepareTilesPending()); |
| 3332 client_->Reset(); | 3337 client_->Reset(); |
| 3333 | 3338 |
| 3334 // Next vsync. | 3339 // Next vsync. |
| 3335 EXPECT_SCOPED(AdvanceFrame()); | 3340 EXPECT_SCOPED(AdvanceFrame()); |
| 3336 EXPECT_FALSE(scheduler_->PrepareTilesPending()); | 3341 EXPECT_FALSE(scheduler_->PrepareTilesPending()); |
| 3337 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); | 3342 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3352 client_->Reset(); | 3357 client_->Reset(); |
| 3353 | 3358 |
| 3354 // Next vsync. | 3359 // Next vsync. |
| 3355 EXPECT_SCOPED(AdvanceFrame()); | 3360 EXPECT_SCOPED(AdvanceFrame()); |
| 3356 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3361 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3357 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3362 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3358 client_->Reset(); | 3363 client_->Reset(); |
| 3359 | 3364 |
| 3360 // Android onDraw. | 3365 // Android onDraw. |
| 3361 scheduler_->SetNeedsRedraw(); | 3366 scheduler_->SetNeedsRedraw(); |
| 3362 scheduler_->OnDrawForOutputSurface(); | 3367 bool resourceless_software_draw = false; |
| 3368 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3363 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); | 3369 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); |
| 3364 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3370 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3365 EXPECT_FALSE(scheduler_->PrepareTilesPending()); | 3371 EXPECT_FALSE(scheduler_->PrepareTilesPending()); |
| 3366 client_->Reset(); | 3372 client_->Reset(); |
| 3367 | 3373 |
| 3368 // Simulate SetNeedsBeginMainFrame due to input event. | 3374 // Simulate SetNeedsBeginMainFrame due to input event. |
| 3369 scheduler_->SetNeedsBeginMainFrame(); | 3375 scheduler_->SetNeedsBeginMainFrame(); |
| 3370 EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_); | 3376 EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_); |
| 3371 client_->Reset(); | 3377 client_->Reset(); |
| 3372 | 3378 |
| 3373 scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks()); | 3379 scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks()); |
| 3374 scheduler_->NotifyReadyToCommit(); | 3380 scheduler_->NotifyReadyToCommit(); |
| 3375 EXPECT_SINGLE_ACTION("ScheduledActionCommit", client_); | 3381 EXPECT_SINGLE_ACTION("ScheduledActionCommit", client_); |
| 3376 client_->Reset(); | 3382 client_->Reset(); |
| 3377 | 3383 |
| 3378 scheduler_->NotifyReadyToActivate(); | 3384 scheduler_->NotifyReadyToActivate(); |
| 3379 EXPECT_SINGLE_ACTION("ScheduledActionActivateSyncTree", client_); | 3385 EXPECT_SINGLE_ACTION("ScheduledActionActivateSyncTree", client_); |
| 3380 client_->Reset(); | 3386 client_->Reset(); |
| 3381 | 3387 |
| 3382 // Next vsync. | 3388 // Next vsync. |
| 3383 EXPECT_SCOPED(AdvanceFrame()); | 3389 EXPECT_SCOPED(AdvanceFrame()); |
| 3384 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); | 3390 EXPECT_ACTION("WillBeginImplFrame", client_, 0, 2); |
| 3385 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); | 3391 EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 1, 2); |
| 3386 client_->Reset(); | 3392 client_->Reset(); |
| 3387 | 3393 |
| 3388 // Android onDraw. | 3394 // Android onDraw. |
| 3389 scheduler_->SetNeedsRedraw(); | 3395 scheduler_->SetNeedsRedraw(); |
| 3390 scheduler_->OnDrawForOutputSurface(); | 3396 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3391 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); | 3397 EXPECT_SINGLE_ACTION("ScheduledActionDrawAndSwapIfPossible", client_); |
| 3392 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3398 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3393 EXPECT_FALSE(scheduler_->PrepareTilesPending()); | 3399 EXPECT_FALSE(scheduler_->PrepareTilesPending()); |
| 3394 client_->Reset(); | 3400 client_->Reset(); |
| 3395 | 3401 |
| 3396 // Simulate SetNeedsBeginMainFrame due to input event. | 3402 // Simulate SetNeedsBeginMainFrame due to input event. |
| 3397 scheduler_->SetNeedsBeginMainFrame(); | 3403 scheduler_->SetNeedsBeginMainFrame(); |
| 3398 EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_); | 3404 EXPECT_SINGLE_ACTION("ScheduledActionSendBeginMainFrame", client_); |
| 3399 client_->Reset(); | 3405 client_->Reset(); |
| 3400 } | 3406 } |
| 3401 | 3407 |
| 3402 TEST_F(SchedulerTest, SynchronousCompositorResourcelessOnDrawWhenInvisible) { | 3408 TEST_F(SchedulerTest, SynchronousCompositorResourcelessOnDrawWhenInvisible) { |
| 3403 scheduler_settings_.using_synchronous_renderer_compositor = true; | 3409 scheduler_settings_.using_synchronous_renderer_compositor = true; |
| 3404 scheduler_settings_.use_external_begin_frame_source = true; | 3410 scheduler_settings_.use_external_begin_frame_source = true; |
| 3405 SetUpScheduler(true); | 3411 SetUpScheduler(true); |
| 3406 | 3412 |
| 3407 scheduler_->SetVisible(false); | 3413 scheduler_->SetVisible(false); |
| 3408 scheduler_->SetResourcelessSoftareDraw(true); | |
| 3409 | 3414 |
| 3410 scheduler_->SetNeedsRedraw(); | 3415 scheduler_->SetNeedsRedraw(); |
| 3411 scheduler_->OnDrawForOutputSurface(); | 3416 bool resourceless_software_draw = true; |
| 3417 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); |
| 3412 // SynchronousCompositor has to draw regardless of visibility. | 3418 // SynchronousCompositor has to draw regardless of visibility. |
| 3413 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1); | 3419 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1); |
| 3414 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); | 3420 EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); |
| 3415 client_->Reset(); | 3421 client_->Reset(); |
| 3416 } | 3422 } |
| 3417 | 3423 |
| 3418 TEST_F(SchedulerTest, AuthoritativeVSyncInterval) { | 3424 TEST_F(SchedulerTest, AuthoritativeVSyncInterval) { |
| 3419 SetUpScheduler(true); | 3425 SetUpScheduler(true); |
| 3420 base::TimeDelta initial_interval = scheduler_->BeginImplFrameInterval(); | 3426 base::TimeDelta initial_interval = scheduler_->BeginImplFrameInterval(); |
| 3421 base::TimeDelta authoritative_interval = | 3427 base::TimeDelta authoritative_interval = |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3546 } | 3552 } |
| 3547 | 3553 |
| 3548 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { | 3554 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { |
| 3549 EXPECT_FALSE(BeginMainFrameOnCriticalPath( | 3555 EXPECT_FALSE(BeginMainFrameOnCriticalPath( |
| 3550 SMOOTHNESS_TAKES_PRIORITY, | 3556 SMOOTHNESS_TAKES_PRIORITY, |
| 3551 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); | 3557 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); |
| 3552 } | 3558 } |
| 3553 | 3559 |
| 3554 } // namespace | 3560 } // namespace |
| 3555 } // namespace cc | 3561 } // namespace cc |
| OLD | NEW |