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

Side by Side Diff: content/browser/renderer_host/browser_compositor_view_mac.mm

Issue 2170053002: Set BrowserCompositorOutputSurface's vsync parameters on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 recyclable_compositor_->compositor()->SetDisplayColorSpace(color_space); 281 recyclable_compositor_->compositor()->SetDisplayColorSpace(color_space);
282 } 282 }
283 283
284 void BrowserCompositorMac::UpdateVSyncParameters( 284 void BrowserCompositorMac::UpdateVSyncParameters(
285 const base::TimeTicks& timebase, 285 const base::TimeTicks& timebase,
286 const base::TimeDelta& interval) { 286 const base::TimeDelta& interval) {
287 if (recyclable_compositor_) { 287 if (recyclable_compositor_) {
288 recyclable_compositor_->compositor() 288 recyclable_compositor_->compositor()
289 ->vsync_manager() 289 ->vsync_manager()
290 ->UpdateVSyncParameters(timebase, interval); 290 ->UpdateVSyncParameters(timebase, interval);
291 recyclable_compositor_->compositor()
292 ->context_factory()
293 ->SetDisplayVSyncParameters(recyclable_compositor_->compositor(),
294 timebase, interval);
291 } 295 }
ccameron 2016/07/25 17:30:12 Would it make sense to just do: if (begin_fram
292 } 296 }
293 297
294 void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) { 298 void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) {
295 render_widget_host_is_hidden_ = hidden; 299 render_widget_host_is_hidden_ = hidden;
296 UpdateState(); 300 UpdateState();
297 } 301 }
298 302
299 void BrowserCompositorMac::SetNSViewAttachedToWindow(bool attached) { 303 void BrowserCompositorMac::SetNSViewAttachedToWindow(bool attached) {
300 ns_view_attached_to_window_ = attached; 304 ns_view_attached_to_window_ = attached;
301 UpdateState(); 305 UpdateState();
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 466
463 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { 467 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const {
464 return last_begin_frame_args_; 468 return last_begin_frame_args_;
465 } 469 }
466 470
467 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { 471 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) {
468 // Only used on Android WebView. 472 // Only used on Android WebView.
469 } 473 }
470 474
471 } // namespace content 475 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698