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

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

Issue 2761843002: [content] Forward BeginFrameAcks through RWHVMac/BrowserCompositorMac. (Closed)
Patch Set: sync Created 3 years, 9 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/renderer_host/render_widget_host_view_mac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <objc/runtime.h> 8 #import <objc/runtime.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 #include <QuartzCore/QuartzCore.h> 10 #include <QuartzCore/QuartzCore.h>
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 1438
1439 last_scroll_offset_ = frame.metadata.root_scroll_offset; 1439 last_scroll_offset_ = frame.metadata.root_scroll_offset;
1440 1440
1441 page_at_minimum_scale_ = 1441 page_at_minimum_scale_ =
1442 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor; 1442 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor;
1443 browser_compositor_->SwapCompositorFrame(compositor_frame_sink_id, 1443 browser_compositor_->SwapCompositorFrame(compositor_frame_sink_id,
1444 local_surface_id, std::move(frame)); 1444 local_surface_id, std::move(frame));
1445 UpdateDisplayVSyncParameters(); 1445 UpdateDisplayVSyncParameters();
1446 } 1446 }
1447 1447
1448 void RenderWidgetHostViewMac::OnBeginFrameDidNotSwap(
1449 const cc::BeginFrameAck& ack) {
1450 browser_compositor_->OnBeginFrameDidNotSwap(ack);
1451 }
1452
1448 void RenderWidgetHostViewMac::ClearCompositorFrame() { 1453 void RenderWidgetHostViewMac::ClearCompositorFrame() {
1449 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame(); 1454 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame();
1450 } 1455 }
1451 1456
1452 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() { 1457 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() {
1453 // TODO(shess): In case of !window, the view has been removed from 1458 // TODO(shess): In case of !window, the view has been removed from
1454 // the view hierarchy because the tab isn't main. Could retrieve 1459 // the view hierarchy because the tab isn't main. Could retrieve
1455 // the information from the main tab for our window. 1460 // the information from the main tab for our window.
1456 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); 1461 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_);
1457 if (!enclosing_window) 1462 if (!enclosing_window)
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 3507
3503 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3508 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3504 // regions that are not draggable. (See ControlRegionView in 3509 // regions that are not draggable. (See ControlRegionView in
3505 // native_app_window_cocoa.mm). This requires the render host view to be 3510 // native_app_window_cocoa.mm). This requires the render host view to be
3506 // draggable by default. 3511 // draggable by default.
3507 - (BOOL)mouseDownCanMoveWindow { 3512 - (BOOL)mouseDownCanMoveWindow {
3508 return YES; 3513 return YES;
3509 } 3514 }
3510 3515
3511 @end 3516 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698