SurfaceFactory_GL::SurfaceFactory_GL(GLContext* gl, SharedSurfaceType type, const SurfaceCaps& caps) : SurfaceFactory(type, caps) , mGL(gl) , mFormats(gl->ChooseGLFormats(caps)) { ChooseBufferBits(caps, mDrawCaps, mReadCaps); }
SurfaceFactory::SurfaceFactory(GLContext* gl, SharedSurfaceType type, const SurfaceCaps& caps) : mGL(gl) , mCaps(caps) , mType(type) , mFormats(gl->ChooseGLFormats(caps)) { ChooseBufferBits(mCaps, &mDrawCaps, &mReadCaps); }
SurfaceFactory::SurfaceFactory(SharedSurfaceType type, GLContext* gl, const SurfaceCaps& caps, const RefPtr<layers::ISurfaceAllocator>& allocator, const layers::TextureFlags& flags) : mType(type) , mGL(gl) , mCaps(caps) , mAllocator(allocator) , mFlags(flags) , mFormats(gl->ChooseGLFormats(caps)) { ChooseBufferBits(mCaps, &mDrawCaps, &mReadCaps); }