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

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

Issue 12277023: Define frame subscription interface and implementation on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git fetch Created 7 years, 10 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
« no previous file with comments | « no previous file | content/browser/renderer_host/compositing_iosurface_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositing_iosurface_mac.h
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.h b/content/browser/renderer_host/compositing_iosurface_mac.h
index 28e1a11d4a2a2b698717f90dfbb653ee4bad135b..32743dc3117ea31da568e312c2a5d42f2989b8b6 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_mac.h
@@ -30,6 +30,8 @@ class Rect;
namespace content {
+class RenderWidgetHostViewFrameSubscriber;
+
// This class manages an OpenGL context and IOSurface for the accelerated
// compositing code path. The GL context is attached to
// RenderWidgetHostViewCocoa for blitting the IOSurface.
@@ -55,7 +57,10 @@ class CompositingIOSurfaceMac {
// Blit the IOSurface at the upper-left corner of the |view|. If |view| window
// size is larger than the IOSurface, the remaining right and bottom edges
// will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views.
- void DrawIOSurface(NSView* view, float scale_factor);
+ // |frame_subscriber| listens to this draw event and provides output buffer
+ // for copying this frame into.
+ void DrawIOSurface(NSView* view, float scale_factor,
+ RenderWidgetHostViewFrameSubscriber* frame_subscriber);
// Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef
// into |out|. The copied region is specified with |src_pixel_subrect| and
@@ -228,6 +233,15 @@ class CompositingIOSurfaceMac {
void StartOrContinueDisplayLink();
void StopDisplayLink();
+ // Copy current frame to |target| video frame. This method must be called
+ // within a CGL context. Returns a callback that should be called outside
+ // of the CGL context.
+ base::Closure CopyToVideoFrameInternal(
+ const gfx::Rect& src_subrect,
+ float src_scale_factor,
+ const scoped_refptr<media::VideoFrame>& target,
+ const base::Callback<void(bool)>& callback);
+
// Two implementations of CopyTo() in synchronous and asynchronous mode.
// These may copy regions smaller than the requested |src_pixel_subrect| if
// the iosurface is smaller than |src_pixel_subrect|.
« no previous file with comments | « no previous file | content/browser/renderer_host/compositing_iosurface_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698