mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
Add comments
This commit is contained in:
parent
749a751369
commit
3dad97af8a
@ -85,6 +85,7 @@ func (i *Image) Size() (int, int) {
|
||||
}
|
||||
|
||||
func (i *Image) Fill(clr color.Color) error {
|
||||
// TODO: Need to clone clr value
|
||||
c := &fillCommand{
|
||||
dst: i,
|
||||
color: clr,
|
||||
|
@ -79,6 +79,8 @@ func (p *Pixels) AppendDrawImageHistory(image *graphics.Image, vertices []int16,
|
||||
if p.stale {
|
||||
return
|
||||
}
|
||||
// All images must be resolved and not stale each after frame.
|
||||
// So we don't have to care if image is stale or not here.
|
||||
item := &drawImageHistoryItem{
|
||||
image: image,
|
||||
vertices: vertices,
|
||||
@ -107,6 +109,7 @@ func (p *Pixels) DependsOn(target *graphics.Image) bool {
|
||||
if p.stale {
|
||||
return false
|
||||
}
|
||||
// TODO: Performance is bad when drawImageHistory is too many.
|
||||
for _, c := range p.drawImageHistory {
|
||||
if c.image == target {
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user