mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add performance tips on DrawImage
This commit is contained in:
parent
e8acd9b6a2
commit
1995219b55
10
image.go
10
image.go
@ -80,6 +80,16 @@ func (i *Image) Fill(clr color.Color) error {
|
||||
//
|
||||
// When the given image is as same as i, DrawImage panics.
|
||||
//
|
||||
// DrawImage works more efficiently as batches
|
||||
// when the successive calls of DrawImages satisfies the below conditions:
|
||||
//
|
||||
// * All render targets are same (A in A.DrawImage(B, op))
|
||||
// * All render sources are same (B in A.DrawImage(B, op))
|
||||
// * All ColorM values are same
|
||||
// * All CompositeMode values are same
|
||||
//
|
||||
// For more performance tips, see https://github.com/hajimehoshi/ebiten/wiki/Performance-Tips.
|
||||
//
|
||||
// DrawImage always returns nil as of 1.5.0-alpha.
|
||||
func (i *Image) DrawImage(img *Image, options *DrawImageOptions) error {
|
||||
if i == img {
|
||||
|
Loading…
Reference in New Issue
Block a user