Exemple #1
0
bool Window_mac::attach(BackendType attachType) {
    this->initWindow();

    window_context_factory::MacWindowInfo info;
    info.fWindow = fWindow;
    switch (attachType) {
        case kRaster_BackendType:
            fWindowContext = NewRasterForMac(info, fRequestedDisplayParams);
            break;
            
        case kNativeGL_BackendType:
        default:
            fWindowContext = NewGLForMac(info, fRequestedDisplayParams);
            break;
    }
    this->onBackendCreated();

    return (SkToBool(fWindowContext));
}
Exemple #2
0
bool Window_mac::attach(BackendType attachType, const DisplayParams& params) {
    this->initWindow(fDisplay, &params);

    MacWindowInfo info;
#if 0
    // Init Mac window info here
    info.foo = foo;
#endif
    switch (attachType) {
#ifdef SK_VULKAN
        case kVulkan_BackendType:
            fWindowContext = NewVulkanForMac(info, params);
            break;
#endif
        case kNativeGL_BackendType:
        default:
            fWindowContext = NewGLForMac(info, params);
            break;
    }

    return (SkToBool(fWindowContext));
}