SharedGraphicsContext3D::SharedGraphicsContext3D(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<SolidFillShader> solidFillShader, PassOwnPtr<TexShader> texShader, PassOwnPtr<BicubicShader> bicubicShader, PassOwnArrayPtr<OwnPtr<ConvolutionShader> > convolutionShaders, CreationFlags flags) : m_context(context) , m_bgraSupported(false) , m_quadVertices(0) , m_solidFillShader(solidFillShader) , m_texShader(texShader) , m_bicubicShader(bicubicShader) , m_convolutionShaders(convolutionShaders) , m_oesStandardDerivativesSupported(false) , m_flags(flags) #if USE(SKIA) , m_grContext(0) #endif { allContexts()->add(this); Extensions3D* extensions = m_context->getExtensions(); m_bgraSupported = extensions->supports("GL_EXT_texture_format_BGRA8888") && extensions->supports("GL_EXT_read_format_bgra"); if (m_bgraSupported) { extensions->ensureEnabled("GL_EXT_texture_format_BGRA8888"); extensions->ensureEnabled("GL_EXT_read_format_bgra"); } m_oesStandardDerivativesSupported = extensions->supports("GL_OES_standard_derivatives"); if (m_oesStandardDerivativesSupported) extensions->ensureEnabled("GL_OES_standard_derivatives"); }
SharedGraphicsContext3D::~SharedGraphicsContext3D() { m_context->deleteBuffer(m_quadVertices); allContexts()->remove(this); #if USE(SKIA) GrSafeUnref(m_grContext); #endif }
SharedGraphicsContext3D::SharedGraphicsContext3D(PassOwnPtr<GraphicsContext3D> context) : m_context(context) , m_quadVertices(0) , m_solidFillShader(SolidFillShader::create(m_context.get())) , m_texShader(TexShader::create(m_context.get())) { allContexts()->add(this); }
void WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String& urlScheme) { if (!urlScheme) return; String schemeLower = urlScheme.lower(); globalURLSchemesWithCustomProtocolHandlers().remove(schemeLower); for (auto* context : allContexts()) context->unregisterSchemeForCustomProtocol(schemeLower); }
// static void SharedGraphicsContext3D::removeTexturesFor(NativeImagePtr ptr) { for (HashSet<SharedGraphicsContext3D*>::iterator it = allContexts()->begin(); it != allContexts()->end(); ++it) (*it)->removeTextureFor(ptr); }
SharedGraphicsContext3D::~SharedGraphicsContext3D() { m_context->deleteBuffer(m_quadVertices); allContexts()->remove(this); }
void WebContext::willStopUsingPrivateBrowsing() { const Vector<WebContext*>& contexts = allContexts(); for (size_t i = 0, count = contexts.size(); i < count; ++i) contexts[i]->setAnyPageGroupMightHavePrivateBrowsingEnabled(false); }