#pragma once
#import "IOSurface.h"
#import "IntSize.h"
#import <QuartzCore/QuartzCore.h>
namespace WebCore {
class GraphicsLayer;
class GraphicsContext3D;
}
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
#if USE(OPENGL)
@interface WebGLLayer : CALayer
#elif USE(OPENGL_ES)
@interface WebGLLayer : CAEAGLLayer
#elif USE(ANGLE)
@interface WebGLLayer : CALayer
#else
#error Unsupported platform
#endif
{
WebCore::GraphicsContext3D* _context;
float _devicePixelRatio;
#if HAVE(IOSURFACE) && (USE(OPENGL) || USE(ANGLE))
std::unique_ptr<WebCore::IOSurface> _contentsBuffer;
std::unique_ptr<WebCore::IOSurface> _drawingBuffer;
std::unique_ptr<WebCore::IOSurface> _spareBuffer;
WebCore::IntSize _bufferSize;
BOOL _usingAlpha;
#endif
#if USE(ANGLE)
void* _eglDisplay;
void* _eglConfig;
void* _contentsPbuffer;
void* _drawingPbuffer;
void* _sparePbuffer;
void* _latchedPbuffer;
#endif
}
@property (nonatomic) WebCore::GraphicsContext3D* context;
- (id)initWithGraphicsContext3D:(WebCore::GraphicsContext3D*)context;
- (CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace;
#if HAVE(IOSURFACE) && (USE(OPENGL) || USE(ANGLE))
- (void)allocateIOSurfaceBackingStoreWithSize:(WebCore::IntSize)size usingAlpha:(BOOL)usingAlpha;
- (void)bindFramebufferToNextAvailableSurface;
#endif
#if USE(ANGLE)
- (void)setEGLDisplay:(void*)eglDisplay config:(void*)eglConfig;
- (void)dealloc;
#endif
@end
ALLOW_DEPRECATED_DECLARATIONS_END