// See cairo_surface_get_fallback_resolution().
//
// C API documentation: http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-get-fallback-resolution
762358
func (surface *Surface) GetFallbackResolution() (float64, float64) {
	var xPixelsPerInch C.double
	var yPixelsPerInch C.double

	C.cairo_surface_get_fallback_resolution(surface.Ptr, &xPixelsPerInch, &yPixelsPerInch)
	if err := surface.status(); err != nil {
		panic(err)
	}
	return float64(xPixelsPerInch), float64(yPixelsPerInch)
}
945500
func (texture *Texture) GetBlendMode() (bm BlendMode, err error) {
	ret := C.SDL_GetTextureBlendMode(texture.cptr(), bm.cptr())
	return bm, errorFromInt(int(ret))
}
537102
func (window *Window) GetPixelFormat() (uint32, error) {
	f := (uint32)(C.SDL_GetWindowPixelFormat(window.cptr()))
	if f == PIXELFORMAT_UNKNOWN {
		return f, GetError()
	}
	return f, nil
}
651943
func (window *Window) GetWindowOpacity() (opacity float32, err error) {
	return opacity, errorFromInt(int(
		C.SDL_GetWindowOpacity(window.cptr(), (*C.float)(unsafe.Pointer(&opacity)))))
}
518543
func (surface *Surface) LowerBlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) error {
	if C.SDL_LowerBlitScaled(surface.cptr(), srcRect.cptr(), dst.cptr(), dstRect.cptr()) != 0 {
		return GetError()
	}
	return nil
}
1127098
func (b *Breaker) fallback(err error, fb ...Fallback) error {
	var final error
	if len(fb) == 0 {
		final = err
		b.stat.update(err, nil, false)
	} else {
		final = fb[0](err)
		b.stat.update(final, err, true)
	}

	if final != nil && b.cond(b.stat.counter) && atomic.CompareAndSwapInt32(&b.state, Closed, Open) {
		b.expiry = time.Now().Add(b.opts.Window)
		b.stat.reset(false, true)
		b.logger.Warn("breaker > open circuit: ", b.name)
	}
	return final
}
1248777
func (cr *Context) GetLineCap() LineCap {
	ret := LineCap(C.cairo_get_line_cap(cr.Ptr))
	if err := cr.status(); err != nil {
		panic(err)
	}
	return ret
}
66701
func (surface *RecordingSurface) GetExtents(extents *Rectangle) bool {
	ret := C.cairo_recording_surface_get_extents(surface.Ptr, (*C.cairo_rectangle_t)(unsafe.Pointer(extents))) != 0
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
1068640
func (scaledFont *ScaledFont) GetScaleMatrix(scaleMatrix *Matrix) {
	C.cairo_scaled_font_get_scale_matrix(scaledFont.Ptr, (*C.cairo_matrix_t)(unsafe.Pointer(scaleMatrix)))
	if err := scaledFont.status(); err != nil {
		panic(err)
	}
}
711400
func FailOnResolutionFailure(imageResolutionType imagepolicyapiv1.ImageResolutionType) bool {
	switch imageResolutionType {
	case imagepolicyapiv1.RequiredRewrite, imagepolicyapiv1.Required:
		return true
	}
	return false
}
1203289
func (dbcr *DiskBlockCacheRemote) GetLastUnrefRev(
	_ context.Context, _ tlf.ID, _ DiskBlockCacheType) (
	kbfsmd.Revision, error) {
	panic("GetLastUnrefRev() not implemented in DiskBlockCacheRemote")
}
307545
func (renderer *Renderer) GetViewport() (rect Rect) {
	C.SDL_RenderGetViewport(renderer.cptr(), rect.cptr())
	return
}
1059969
func (d *DefaultMetricCollector) FallbackFailures() *rolling.Number {
	d.mutex.RLock()
	defer d.mutex.RUnlock()
	return d.fallbackFailures
}
1206779
func (cache *diskBlockCacheWrapped) GetLastUnrefRev(
	ctx context.Context, tlfID tlf.ID, cacheType DiskBlockCacheType) (
	kbfsmd.Revision, error) {
	cache.mtx.RLock()
	defer cache.mtx.RUnlock()
	c, err := cache.getCacheLocked(cacheType)
	if err != nil {
		return kbfsmd.RevisionUninitialized, err
	}
	return c.GetLastUnrefRev(ctx, tlfID)
}
795464
func (surface *Surface) GetType() SurfaceType {
	ret := SurfaceType(C.cairo_surface_get_type(surface.Ptr))
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
122008
func HTTPClientWithFallBack(h *http.Client) *http.Client {
	if h != nil {
		return h
	}
	return http.DefaultClient
}
722067
func (options *FontOptions) GetAntialias() Antialias {
	ret := Antialias(C.cairo_font_options_get_antialias(options.Ptr))
	if err := options.status(); err != nil {
		panic(err)
	}
	return ret
}