| OLD | NEW |
| 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3218 // A compositor lock that is part of a resize lock timed out. We | 3218 // A compositor lock that is part of a resize lock timed out. We |
| 3219 // should display a renderer frame. | 3219 // should display a renderer frame. |
| 3220 if (!compositor->IsLocked() && can_lock_compositor_ == YES_DID_LOCK) { | 3220 if (!compositor->IsLocked() && can_lock_compositor_ == YES_DID_LOCK) { |
| 3221 can_lock_compositor_ = NO_PENDING_RENDERER_FRAME; | 3221 can_lock_compositor_ = NO_PENDING_RENDERER_FRAME; |
| 3222 } | 3222 } |
| 3223 } | 3223 } |
| 3224 | 3224 |
| 3225 void RenderWidgetHostViewAura::OnUpdateVSyncParameters( | 3225 void RenderWidgetHostViewAura::OnUpdateVSyncParameters( |
| 3226 base::TimeTicks timebase, | 3226 base::TimeTicks timebase, |
| 3227 base::TimeDelta interval) { | 3227 base::TimeDelta interval) { |
| 3228 if (IsShowing()) { | 3228 if (IsShowing()) |
| 3229 if (IsDeadlineSchedulingEnabled()) { | 3229 host_->UpdateVSyncParameters(timebase, interval); |
| 3230 // The deadline scheduler has logic to stagger the draws of the | |
| 3231 // Renderer and Browser built-in, so send it an accurate timebase. | |
| 3232 host_->UpdateVSyncParameters(timebase, interval); | |
| 3233 } else if (!last_draw_ended_.is_null()) { | |
| 3234 // For the non-deadline scheduler, we send the Renderer an offset | |
| 3235 // vsync timebase to avoid its draws racing the Browser's draws. | |
| 3236 host_->UpdateVSyncParameters(last_draw_ended_, interval); | |
| 3237 } | |
| 3238 } | |
| 3239 } | 3230 } |
| 3240 | 3231 |
| 3241 //////////////////////////////////////////////////////////////////////////////// | 3232 //////////////////////////////////////////////////////////////////////////////// |
| 3242 // RenderWidgetHostViewAura, BrowserAccessibilityDelegate implementation: | 3233 // RenderWidgetHostViewAura, BrowserAccessibilityDelegate implementation: |
| 3243 | 3234 |
| 3244 void RenderWidgetHostViewAura::SetAccessibilityFocus(int acc_obj_id) { | 3235 void RenderWidgetHostViewAura::SetAccessibilityFocus(int acc_obj_id) { |
| 3245 if (!host_) | 3236 if (!host_) |
| 3246 return; | 3237 return; |
| 3247 | 3238 |
| 3248 host_->AccessibilitySetFocus(acc_obj_id); | 3239 host_->AccessibilitySetFocus(acc_obj_id); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3601 RenderWidgetHost* widget) { | 3592 RenderWidgetHost* widget) { |
| 3602 return new RenderWidgetHostViewAura(widget); | 3593 return new RenderWidgetHostViewAura(widget); |
| 3603 } | 3594 } |
| 3604 | 3595 |
| 3605 // static | 3596 // static |
| 3606 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3597 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3607 GetScreenInfoForWindow(results, NULL); | 3598 GetScreenInfoForWindow(results, NULL); |
| 3608 } | 3599 } |
| 3609 | 3600 |
| 3610 } // namespace content | 3601 } // namespace content |
| OLD | NEW |