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

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

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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
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 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 1413
1414 last_scroll_offset_ = frame.metadata.root_scroll_offset; 1414 last_scroll_offset_ = frame.metadata.root_scroll_offset;
1415 1415
1416 page_at_minimum_scale_ = 1416 page_at_minimum_scale_ =
1417 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor; 1417 frame.metadata.page_scale_factor == frame.metadata.min_page_scale_factor;
1418 browser_compositor_->SwapCompositorFrame(compositor_frame_sink_id, 1418 browser_compositor_->SwapCompositorFrame(compositor_frame_sink_id,
1419 std::move(frame)); 1419 std::move(frame));
1420 UpdateDisplayVSyncParameters(); 1420 UpdateDisplayVSyncParameters();
1421 } 1421 }
1422 1422
1423 void RenderWidgetHostViewMac::OnBeginFrameDidNotDraw(
1424 const cc::BeginFrameAck& ack) {
1425 browser_compositor_->OnBeginFrameDidNotDraw(ack);
1426 }
1427
1423 void RenderWidgetHostViewMac::ClearCompositorFrame() { 1428 void RenderWidgetHostViewMac::ClearCompositorFrame() {
1424 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame(); 1429 browser_compositor_->GetDelegatedFrameHost()->ClearDelegatedFrame();
1425 } 1430 }
1426 1431
1427 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() { 1432 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() {
1428 // TODO(shess): In case of !window, the view has been removed from 1433 // TODO(shess): In case of !window, the view has been removed from
1429 // the view hierarchy because the tab isn't main. Could retrieve 1434 // the view hierarchy because the tab isn't main. Could retrieve
1430 // the information from the main tab for our window. 1435 // the information from the main tab for our window.
1431 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); 1436 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_);
1432 if (!enclosing_window) 1437 if (!enclosing_window)
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after
3438 3443
3439 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3444 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3440 // regions that are not draggable. (See ControlRegionView in 3445 // regions that are not draggable. (See ControlRegionView in
3441 // native_app_window_cocoa.mm). This requires the render host view to be 3446 // native_app_window_cocoa.mm). This requires the render host view to be
3442 // draggable by default. 3447 // draggable by default.
3443 - (BOOL)mouseDownCanMoveWindow { 3448 - (BOOL)mouseDownCanMoveWindow {
3444 return YES; 3449 return YES;
3445 } 3450 }
3446 3451
3447 @end 3452 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698