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

Unified Diff: content/browser/renderer_host/compositing_iosurface_layer_mac.h

Issue 16189012: Add a path to use CALayers to display content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve again Created 7 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/renderer_host/compositing_iosurface_layer_mac.h
diff --git a/content/browser/renderer_host/compositing_iosurface_layer_mac.h b/content/browser/renderer_host/compositing_iosurface_layer_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..35dfb8f14df70a6d917fd9e734c4dbc87f956519
--- /dev/null
+++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
+#define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/ref_counted.h"
+
+namespace content {
+class CompositingIOSurfaceContext;
+class RenderWidgetHostViewMac;
+}
+
+// The CoreAnimation layer for drawing accelerated content.
+@interface CompositingIOSurfaceLayer : CAOpenGLLayer {
+ @private
+ content::RenderWidgetHostViewMac* renderWidgetHostView_;
+ scoped_refptr<content::CompositingIOSurfaceContext> context_;
+}
+
+@property(nonatomic, readonly)
+ scoped_refptr<content::CompositingIOSurfaceContext> context;
+
+- (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r;
+
+// The OpenGL context may be destroyed periodically (e.g, when moving across
+// displays). This will re-allocate the context if need be, and returns whether
+// or not the context now exists.
+- (BOOL)ensureContext;
+
+// Update the scale factor of the layer to match the scale factor of the
+// IOSurface.
+- (void)updateScaleFactor;
+
+// Remove this layer from the layer heirarchy, and mark that
+// |renderWidgetHostView_| is no longer valid and may no longer be dereferenced.
+- (void)disableCompositing;
+
+@end
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | content/browser/renderer_host/compositing_iosurface_layer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698