| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_compositor_view_mac.h" | 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 void BrowserCompositorMac::SetDisplayColorSpace( | 293 void BrowserCompositorMac::SetDisplayColorSpace( |
| 294 const gfx::ColorSpace& color_space) { | 294 const gfx::ColorSpace& color_space) { |
| 295 if (recyclable_compositor_) | 295 if (recyclable_compositor_) |
| 296 recyclable_compositor_->compositor()->SetDisplayColorSpace(color_space); | 296 recyclable_compositor_->compositor()->SetDisplayColorSpace(color_space); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void BrowserCompositorMac::UpdateVSyncParameters( | 299 void BrowserCompositorMac::UpdateVSyncParameters( |
| 300 const base::TimeTicks& timebase, | 300 const base::TimeTicks& timebase, |
| 301 const base::TimeDelta& interval) { | 301 const base::TimeDelta& interval) { |
| 302 if (recyclable_compositor_) { | 302 if (recyclable_compositor_) { |
| 303 recyclable_compositor_->compositor() | 303 recyclable_compositor_->compositor()->SetDisplayVSyncParameters( |
| 304 ->vsync_manager() | 304 timebase, interval); |
| 305 ->UpdateVSyncParameters(timebase, interval); | |
| 306 recyclable_compositor_->compositor() | |
| 307 ->context_factory() | |
| 308 ->SetDisplayVSyncParameters(recyclable_compositor_->compositor(), | |
| 309 timebase, interval); | |
| 310 } | 305 } |
| 311 } | 306 } |
| 312 | 307 |
| 313 void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) { | 308 void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) { |
| 314 render_widget_host_is_hidden_ = hidden; | 309 render_widget_host_is_hidden_ = hidden; |
| 315 UpdateState(); | 310 UpdateState(); |
| 316 } | 311 } |
| 317 | 312 |
| 318 void BrowserCompositorMac::SetNSViewAttachedToWindow(bool attached) { | 313 void BrowserCompositorMac::SetNSViewAttachedToWindow(bool attached) { |
| 319 ns_view_attached_to_window_ = attached; | 314 ns_view_attached_to_window_ = attached; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 476 |
| 482 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { | 477 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { |
| 483 return last_begin_frame_args_; | 478 return last_begin_frame_args_; |
| 484 } | 479 } |
| 485 | 480 |
| 486 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { | 481 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { |
| 487 // Only used on Android WebView. | 482 // Only used on Android WebView. |
| 488 } | 483 } |
| 489 | 484 |
| 490 } // namespace content | 485 } // namespace content |
| OLD | NEW |