blob: 39b4e4b515dd625caf2dd28f3690521e0024f0e2 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
/**
* FlutterIOSurfaceHolder maintains an IOSurface
* and provides an interface to bind the IOSurface to a texture.
*/
@interface FlutterIOSurfaceHolder : NSObject
/**
* Bind the IOSurface to the provided texture and fbo.
*/
- (void)bindSurfaceToTexture:(GLuint)texture fbo:(GLuint)fbo size:(CGSize)size;
/**
* Releases the current IOSurface if one exists
* and creates a new IOSurface with the specified size.
*/
- (void)recreateIOSurfaceWithSize:(CGSize)size;
/**
* Returns a reference to the underlying IOSurface.
*/
- (const IOSurfaceRef&)ioSurface;
@end