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

Unified Diff: content/browser/compositor/browser_compositor_view_mac.h

Issue 316103004: Mac ÜC: Enable GPU back-pressure from the browser to the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dip
Patch Set: Simplify Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
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 f1988c26a5addcadd5700c288feb665fb970b42c..3b061c266ecd1f16939a5a35a40da9de016896df 100644
--- a/content/browser/compositor/browser_compositor_view_mac.h
+++ b/content/browser/compositor/browser_compositor_view_mac.h
@@ -15,7 +15,15 @@
#include "ui/compositor/compositor.h"
#include "ui/gfx/geometry/size.h"
-@class BrowserCompositorViewMac;
+namespace content {
+class BrowserCompositorViewMacHelper;
+
+class BrowserCompositorViewMacClient {
+ public:
+ virtual void BrowserCompositorDidDrawFrame() = 0;
+};
+
+} // namespace content
// Additions to the NSView interface for compositor frames.
@interface NSView (BrowserCompositorView)
@@ -26,7 +34,7 @@
- (void)gotSoftwareFrame:(cc::SoftwareFrameData*)frame_data
withScaleFactor:(float)scale_factor
withCanvas:(SkCanvas*)canvas;
-@end
+@end // NSView (BrowserCompositorView)
// NSView drawn by a ui::Compositor. The superview of this view is responsible
// for changing the ui::Compositor SizeAndScale and calling layoutLayers when
@@ -34,20 +42,28 @@
// the needs of RenderWidgetHostViewCocoa, and could change.
@interface BrowserCompositorViewMac : NSView {
scoped_ptr<ui::Compositor> compositor_;
+
base::scoped_nsobject<CALayer> background_layer_;
base::scoped_nsobject<CompositingIOSurfaceLayer> accelerated_layer_;
base::scoped_nsobject<SoftwareLayer> software_layer_;
+
+ content::BrowserCompositorViewMacClient* client_;
+ scoped_ptr<content::BrowserCompositorViewMacHelper> helper_;
}
// Initialize to render the content of a specific superview.
-- (id)initWithSuperview:(NSView*)view;
+- (id)initWithSuperview:(NSView*)view
+ withClient:(content::BrowserCompositorViewMacClient*)client;
// Re-position the layers to the correct place when this view's superview
// changes size, or when the accelerated or software content changes.
- (void)layoutLayers;
+// Disallow further access to the client.
+- (void)resetClient;
+
// Access the underlying ui::Compositor for this view.
- (ui::Compositor*)compositor;
-@end
+@end // BrowserCompositorViewMac
#endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698