From 3d8a45a7705ffdf87e0b4cdf7ce5a27b9fc5c783 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 17 Feb 2019 14:30:32 +0900 Subject: [PATCH] graphicsdriver/opengl: Refactoring --- internal/graphicsdriver/opengl/program.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/graphicsdriver/opengl/program.go b/internal/graphicsdriver/opengl/program.go index 880e08927..951aaa45d 100644 --- a/internal/graphicsdriver/opengl/program.go +++ b/internal/graphicsdriver/opengl/program.go @@ -322,10 +322,9 @@ func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM, } } - sw := graphics.InternalImageSize(srcW) - sh := graphics.InternalImageSize(srcH) - if filter != graphics.FilterNearest { + sw := graphics.InternalImageSize(srcW) + sh := graphics.InternalImageSize(srcH) if d.state.lastSourceWidth != sw || d.state.lastSourceHeight != sh { d.context.uniformFloats(program, "source_size", []float32{float32(sw), float32(sh)}) d.state.lastSourceWidth = sw