예제 #1
0
bool
GLScreenBuffer::Swap(const gfx::IntSize& size)
{
    SharedSurface* nextSurf = mStream->SwapProducer(mFactory, size);
    if (!nextSurf) {
        SurfaceFactory_Basic basicFactory(mGL, mFactory->Caps());
        nextSurf = mStream->SwapProducer(&basicFactory, size);
        if (!nextSurf)
          return false;

        NS_WARNING("SwapProd failed for sophisticated Factory type, fell back to Basic.");
    }
    MOZ_ASSERT(nextSurf);

    Attach(nextSurf, size);

    return true;
}
std::unique_ptr<KVHarnessHelper> KVHarnessHelper::create() {
    return basicFactory();
};