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

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

Issue 1273563002: Mac Overlays: Add GPU back-pressure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use default fences Created 5 years, 4 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 <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // immediately. 508 // immediately.
509 return true; 509 return true;
510 } 510 }
511 } 511 }
512 512
513 // If the window occlusion API is not present then ack frames when we draw 513 // If the window occlusion API is not present then ack frames when we draw
514 // them. 514 // them.
515 return false; 515 return false;
516 } 516 }
517 517
518 uint32_t RenderWidgetHostViewMac::AcceleratedWidgetGetDisplayIDForVSync()
519 const {
520 if (display_link_)
521 return display_link_->display_id();
522 return 0;
523 }
524
518 void RenderWidgetHostViewMac::AcceleratedWidgetSwapCompleted( 525 void RenderWidgetHostViewMac::AcceleratedWidgetSwapCompleted(
519 const std::vector<ui::LatencyInfo>& all_latency_info) { 526 const std::vector<ui::LatencyInfo>& all_latency_info) {
520 if (!render_widget_host_) 527 if (!render_widget_host_)
521 return; 528 return;
522 base::TimeTicks swap_time = base::TimeTicks::Now(); 529 base::TimeTicks swap_time = base::TimeTicks::Now();
523 for (auto latency_info : all_latency_info) { 530 for (auto latency_info : all_latency_info) {
524 latency_info.AddLatencyNumberWithTimestamp( 531 latency_info.AddLatencyNumberWithTimestamp(
525 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1); 532 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1);
526 latency_info.AddLatencyNumberWithTimestamp( 533 latency_info.AddLatencyNumberWithTimestamp(
527 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0, 534 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 3309
3303 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3310 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3304 // regions that are not draggable. (See ControlRegionView in 3311 // regions that are not draggable. (See ControlRegionView in
3305 // native_app_window_cocoa.mm). This requires the render host view to be 3312 // native_app_window_cocoa.mm). This requires the render host view to be
3306 // draggable by default. 3313 // draggable by default.
3307 - (BOOL)mouseDownCanMoveWindow { 3314 - (BOOL)mouseDownCanMoveWindow {
3308 return YES; 3315 return YES;
3309 } 3316 }
3310 3317
3311 @end 3318 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698