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

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

Issue 2890063002: Send BeginFrames for the renderer using Mojo (Closed)
Patch Set: c Created 3 years, 7 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
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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // When making an element on the page fullscreen the element's background 393 // When making an element on the page fullscreen the element's background
394 // may not match the page's, so use black as the gutter color to avoid 394 // may not match the page's, so use black as the gutter color to avoid
395 // flashes of brighter colors during the transition. 395 // flashes of brighter colors during the transition.
396 if (render_widget_host_->delegate() && 396 if (render_widget_host_->delegate() &&
397 render_widget_host_->delegate()->IsFullscreenForCurrentTab()) { 397 render_widget_host_->delegate()->IsFullscreenForCurrentTab()) {
398 return SK_ColorBLACK; 398 return SK_ColorBLACK;
399 } 399 }
400 return color; 400 return color;
401 } 401 }
402 402
403 void RenderWidgetHostViewMac::BrowserCompositorMacSendBeginFrame( 403 void RenderWidgetHostViewMac::BrowserCompositorMacOnBeginFrame() {
404 const cc::BeginFrameArgs& args) {
405 needs_flush_input_ = false; 404 needs_flush_input_ = false;
406 render_widget_host_->OnBeginFrame(); 405 render_widget_host_->OnBeginFrame();
407 UpdateNeedsBeginFramesInternal(); 406 UpdateNeedsBeginFramesInternal();
408 render_widget_host_->Send(
409 new ViewMsg_BeginFrame(render_widget_host_->GetRoutingID(), args));
410 } 407 }
411 408
412 //////////////////////////////////////////////////////////////////////////////// 409 ////////////////////////////////////////////////////////////////////////////////
413 // AcceleratedWidgetMacNSView, public: 410 // AcceleratedWidgetMacNSView, public:
414 411
415 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { 412 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const {
416 return cocoa_view_; 413 return cocoa_view_;
417 } 414 }
418 415
419 void RenderWidgetHostViewMac::AcceleratedWidgetGetVSyncParameters( 416 void RenderWidgetHostViewMac::AcceleratedWidgetGetVSyncParameters(
(...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3524 3521
3525 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3522 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3526 // regions that are not draggable. (See ControlRegionView in 3523 // regions that are not draggable. (See ControlRegionView in
3527 // native_app_window_cocoa.mm). This requires the render host view to be 3524 // native_app_window_cocoa.mm). This requires the render host view to be
3528 // draggable by default. 3525 // draggable by default.
3529 - (BOOL)mouseDownCanMoveWindow { 3526 - (BOOL)mouseDownCanMoveWindow {
3530 return YES; 3527 return YES;
3531 } 3528 }
3532 3529
3533 @end 3530 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698