gl: Fix padding in icon library
The previous code would not pad the left side with the left column of pixels but with the top row. Test attached.
This commit is contained in:
committed by
Matthias Clasen
parent
013a06f596
commit
9f8cf5b0bd
@@ -148,6 +148,7 @@ gsk_gl_icon_library_add (GskGLIconLibrary *self,
|
||||
gl_format, gl_type,
|
||||
pixel_data);
|
||||
/* Padding left */
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, width);
|
||||
glTexSubImage2D (GL_TEXTURE_2D, 0,
|
||||
packed_x, packed_y + 1,
|
||||
1, height,
|
||||
@@ -161,7 +162,6 @@ gsk_gl_icon_library_add (GskGLIconLibrary *self,
|
||||
pixel_data);
|
||||
|
||||
/* Padding right */
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, width);
|
||||
glPixelStorei (GL_UNPACK_SKIP_PIXELS, width - 1);
|
||||
glTexSubImage2D (GL_TEXTURE_2D, 0,
|
||||
packed_x + width + 1, packed_y + 1,
|
||||
|
||||
6
testsuite/gsk/compare/blurred-lines.node
Normal file
6
testsuite/gsk/compare/blurred-lines.node
Normal file
@@ -0,0 +1,6 @@
|
||||
texture {
|
||||
bounds: 0 0 20 20;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAYAAAC07qxWAAAAHElEQVQokWP8z8D6n4EIwESMolGF\
|
||||
1FM4CgYrAACekgIXqju67AAAAABJRU5ErkJggg==\
|
||||
");
|
||||
}
|
||||
BIN
testsuite/gsk/compare/blurred-lines.png
Normal file
BIN
testsuite/gsk/compare/blurred-lines.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 B |
@@ -19,6 +19,7 @@ compare_render_tests = [
|
||||
'blend-invisible-child',
|
||||
'blend-in-rotate',
|
||||
'blend-normal',
|
||||
'blurred-lines',
|
||||
'border-bottom-right',
|
||||
'border-one-rounded',
|
||||
'borders-rotated',
|
||||
|
||||
Reference in New Issue
Block a user