Index: content/browser/compositor/browser_compositor_view_mac.h |
diff --git a/content/browser/compositor/browser_compositor_view_mac.h b/content/browser/compositor/browser_compositor_view_mac.h |
index 0dc358bbe79a980fb84f0fe9ffe16378dc3db93d..49ac4dd2abcda287d71870b3bef668985ba238af 100644 |
--- a/content/browser/compositor/browser_compositor_view_mac.h |
+++ b/content/browser/compositor/browser_compositor_view_mac.h |
@@ -52,6 +52,12 @@ class BrowserCompositorViewMacClient { |
// Used to install the root ui::Layer into the ui::Compositor. |
virtual ui::Layer* BrowserCompositorRootLayer() = 0; |
+ |
+ // If this returns true, then frames will be drawn immediately when they are |
+ // received, instead of waiting for the CAOpenGLLayer's callback. This helps |
+ // de-jank resize, because said callback can't come through while pumping for |
+ // resized frames. |
+ virtual bool BrowserCompositorShouldDrawImmediately() = 0; |
}; |
// The class to hold a ui::Compositor-backed NSView. Because a ui::Compositor |
@@ -66,9 +72,15 @@ class BrowserCompositorViewMac { |
explicit BrowserCompositorViewMac(BrowserCompositorViewMacClient* client); |
~BrowserCompositorViewMac(); |
+ // The NSView set at the sub-view for this view. |
+ NSView* GetView() const; |
+ |
// The ui::Compositor being used to render the NSView. |
ui::Compositor* GetCompositor() const; |
+ // Check if a frame of the correct size is currently being displayed. |
+ bool HasFrameWithSizeInDIP(const gfx::Size& desired_size_in_dip) const; |
+ |
// The client (used by the BrowserCompositorViewCocoa to access the client). |
BrowserCompositorViewMacClient* GetClient() const { return client_; } |