Пример #1
0
def test_GrBackendRenderTarget_getMockRenderTargetInfo(backend_render_target):
    info = skia.GrMockRenderTargetInfo()
    assert isinstance(backend_render_target.getMockRenderTargetInfo(info),
                      bool)
Пример #2
0
def mock_render_target_info():
    return skia.GrMockRenderTargetInfo()
Пример #3
0
    grflushinfo.semaphores = [backend_semaphore]
    assert isinstance(grflushinfo.semaphores, list)


@pytest.fixture
def backend_render_target():
    return skia.GrBackendRenderTarget()


@pytest.mark.parametrize(
    'args',
    [
        tuple(),
        (128, 128, 2, 8, skia.GrGLFramebufferInfo()),
        # (128, 128, 2, 8, skia.GrVkImageInfo()),
        (128, 128, 2, 8, skia.GrMockRenderTargetInfo()),
    ])
def test_GrBackendRenderTarget_init(args):
    assert isinstance(skia.GrBackendRenderTarget(*args),
                      skia.GrBackendRenderTarget)


def test_GrBackendRenderTarget_dimensions(backend_render_target):
    assert isinstance(backend_render_target.dimensions(), skia.ISize)


def test_GrBackendRenderTarget_width(backend_render_target):
    assert isinstance(backend_render_target.width(), int)


def test_GrBackendRenderTarget_height(backend_render_target):