Пример #1
0
def test_Surface_MakeFromBackendTexture(context):
    texture = skia.GrBackendTexture()
    assert isinstance(
        skia.Surface.MakeFromBackendTexture(
            context, texture, skia.kTopLeft_GrSurfaceOrigin, 0,
            skia.kRGBA_8888_ColorType, skia.ColorSpace.MakeSRGB(), None),
        (type(None), skia.Surface))
Пример #2
0
def test_Surface_MakeFromBackendTexture_2(context):
    characterization = skia.SurfaceCharacterization()
    texture = skia.GrBackendTexture()
    assert isinstance(
        skia.Surface.MakeFromBackendTexture(context, characterization,
                                            texture),
        (type(None), skia.Surface))
Пример #3
0
def test_Imag_MakeBackendTextureFromImage(context, image):
    backendTexture = skia.GrBackendTexture()
    assert isinstance(
        skia.Image.MakeBackendTextureFromImage(context, image, backendTexture),
        bool)
Пример #4
0
def test_Surface_replaceBackendTexture(surface):
    assert isinstance(
        surface.replaceBackendTexture(
            skia.GrBackendTexture(), skia.kTopLeft_GrSurfaceOrigin),
        bool)
Пример #5
0
def test_GrBackendTexture_init_glInfo(gl_texture_info):
    assert isinstance(
        skia.GrBackendTexture(128, 128, skia.GrMipMapped.kNo, gl_texture_info),
        skia.GrBackendTexture)
Пример #6
0
def backend_texture(context, gl_texture_info):
    return skia.GrBackendTexture(256, 256, skia.GrMipMapped.kNo,
                                 gl_texture_info)
Пример #7
0
def test_GrBackendTexture_init_mockInfo(mock_texture_info):
    assert isinstance(
        skia.GrBackendTexture(128, 128, skia.GrMipMapped.kNo,
                              mock_texture_info), skia.GrBackendTexture)
Пример #8
0
def test_GrBackendTexture_init_mockInfo():
    mock_info = skia.GrMockTextureInfo()
    assert isinstance(
        skia.GrBackendTexture(128, 128, skia.GrMipMapped.kNo, mock_info),
        skia.GrBackendTexture)
Пример #9
0
def test_GrBackendTexture_init_glInfo():
    gl_info = skia.GrGLTextureInfo()
    assert isinstance(
        skia.GrBackendTexture(128, 128, skia.GrMipMapped.kNo, gl_info),
        skia.GrBackendTexture)
Пример #10
0
def backend_texture():
    return skia.GrBackendTexture()