23 PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT)
const override;
35 this->initializeContext();
38EGLDisplay ANGLEWindowContext_mac::onGetEGLDisplay(
39 PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT)
const {
42 return eglGetPlatformDisplayEXT(
46NativeWindowType ANGLEWindowContext_mac::onGetNativeWindow()
const {
47 [fMainView setWantsLayer:YES];
48 return fMainView.layer;
51int ANGLEWindowContext_mac::onGetStencilBits()
const {
53 NSOpenGLPixelFormat* pixelFormat = skwindow::GetGLPixelFormat(fDisplayParams.fMSAASampleCount);
54 [pixelFormat getValues:&stencilBits forAttribute:NSOpenGLPFAStencilSize forVirtualScreen:0];
58SkISize ANGLEWindowContext_mac::onGetSize()
const {
60 return SkISize::Make(fMainView.bounds.size.width * backingScaleFactor,
61 fMainView.bounds.size.height * backingScaleFactor);
70 std::unique_ptr<WindowContext> ctx(
new ANGLEWindowContext_mac(
info,
params));
71 if (!ctx->isValid()) {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define EGL_PLATFORM_ANGLE_TYPE_ANGLE
#define EGL_PLATFORM_ANGLE_ANGLE
#define EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE
virtual SkISize onGetSize() const =0
virtual int onGetStencilBits() const =0
virtual EGLDisplay onGetEGLDisplay(PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT) const =0
virtual NativeWindowType onGetNativeWindow() const =0
const EmbeddedViewParams * params
std::unique_ptr< WindowContext > MakeANGLEForMac(const MacWindowInfo &info, const DisplayParams ¶ms)
static CGFloat GetBackingScaleFactor(NSView *view)
static constexpr SkISize Make(int32_t w, int32_t h)