Exemplo n.º 1
0
SurfaceFactory_GL::SurfaceFactory_GL(GLContext* gl,
                                     SharedSurfaceType type,
                                     const SurfaceCaps& caps)
    : SurfaceFactory(type, caps)
    , mGL(gl)
    , mFormats(gl->ChooseGLFormats(caps))
{
    ChooseBufferBits(caps, mDrawCaps, mReadCaps);
}
Exemplo n.º 2
0
SurfaceFactory::SurfaceFactory(GLContext* gl,
                               SharedSurfaceType type,
                               const SurfaceCaps& caps)
    : mGL(gl)
    , mCaps(caps)
    , mType(type)
    , mFormats(gl->ChooseGLFormats(caps))
{
    ChooseBufferBits(mCaps, &mDrawCaps, &mReadCaps);
}
Exemplo n.º 3
0
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);
}