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

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

Issue 408103004: Mac: Fix bad framerate when capturing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurfaceAPI.h> 9 #include <IOSurface/IOSurfaceAPI.h>
10 #include <list> 10 #include <list>
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 virtual bool Send(IPC::Message* message) OVERRIDE; 343 virtual bool Send(IPC::Message* message) OVERRIDE;
344 344
345 // SoftwareFrameManagerClient implementation: 345 // SoftwareFrameManagerClient implementation:
346 virtual void SoftwareFrameWasFreed( 346 virtual void SoftwareFrameWasFreed(
347 uint32 output_surface_id, unsigned frame_id) OVERRIDE; 347 uint32 output_surface_id, unsigned frame_id) OVERRIDE;
348 virtual void ReleaseReferencesToSoftwareFrame() OVERRIDE; 348 virtual void ReleaseReferencesToSoftwareFrame() OVERRIDE;
349 349
350 virtual SkColorType PreferredReadbackFormat() OVERRIDE; 350 virtual SkColorType PreferredReadbackFormat() OVERRIDE;
351 351
352 // CompositingIOSurfaceLayerClient implementation. 352 // CompositingIOSurfaceLayerClient implementation.
353 virtual bool AcceleratedLayerShouldAckImmediately() const OVERRIDE;
353 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) OVERRIDE; 354 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) OVERRIDE;
354 355
355 // gfx::DisplayObserver implementation. 356 // gfx::DisplayObserver implementation.
356 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; 357 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
357 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; 358 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
358 virtual void OnDisplayMetricsChanged(const gfx::Display& display, 359 virtual void OnDisplayMetricsChanged(const gfx::Display& display,
359 uint32_t metrics) OVERRIDE; 360 uint32_t metrics) OVERRIDE;
360 361
361 // Forwards the mouse event to the renderer. 362 // Forwards the mouse event to the renderer.
362 void ForwardMouseEvent(const blink::WebMouseEvent& event); 363 void ForwardMouseEvent(const blink::WebMouseEvent& event);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 const gfx::Rect& damage_rect_in_dip) OVERRIDE; 514 const gfx::Rect& damage_rect_in_dip) OVERRIDE;
514 virtual bool IsVisible() OVERRIDE; 515 virtual bool IsVisible() OVERRIDE;
515 virtual scoped_ptr<ResizeLock> CreateResizeLock( 516 virtual scoped_ptr<ResizeLock> CreateResizeLock(
516 bool defer_compositor_lock) OVERRIDE; 517 bool defer_compositor_lock) OVERRIDE;
517 virtual gfx::Size DesiredFrameSize() OVERRIDE; 518 virtual gfx::Size DesiredFrameSize() OVERRIDE;
518 virtual float CurrentDeviceScaleFactor() OVERRIDE; 519 virtual float CurrentDeviceScaleFactor() OVERRIDE;
519 virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) OVERRIDE; 520 virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) OVERRIDE;
520 virtual DelegatedFrameHost* GetDelegatedFrameHost() const OVERRIDE; 521 virtual DelegatedFrameHost* GetDelegatedFrameHost() const OVERRIDE;
521 522
522 // BrowserCompositorViewMacClient implementation. 523 // BrowserCompositorViewMacClient implementation.
524 virtual bool BrowserCompositorViewShouldAckImmediately() const OVERRIDE;
523 virtual void BrowserCompositorViewFrameSwapped( 525 virtual void BrowserCompositorViewFrameSwapped(
524 const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE; 526 const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE;
525 virtual NSView* BrowserCompositorSuperview() OVERRIDE; 527 virtual NSView* BrowserCompositorSuperview() OVERRIDE;
526 virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE; 528 virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE;
527 529
528 private: 530 private:
529 friend class RenderWidgetHostViewMacTest; 531 friend class RenderWidgetHostViewMacTest;
530 532
531 struct PendingSwapAck { 533 struct PendingSwapAck {
532 PendingSwapAck(int32 route_id, int gpu_host_id, int32 renderer_id) 534 PendingSwapAck(int32 route_id, int gpu_host_id, int32 renderer_id)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; 627 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
626 628
627 base::WeakPtrFactory<RenderWidgetHostViewMac> 629 base::WeakPtrFactory<RenderWidgetHostViewMac>
628 software_frame_weak_ptr_factory_; 630 software_frame_weak_ptr_factory_;
629 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 631 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
630 }; 632 };
631 633
632 } // namespace content 634 } // namespace content
633 635
634 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 636 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698