forked from AuroraMiddleware/gtk
gl renderer: call glViewport directly
This commit is contained in:
parent
d3ffaa0236
commit
7f8106f2a9
@ -2034,23 +2034,6 @@ gsk_gl_renderer_unrealize (GskRenderer *renderer)
|
||||
g_clear_object (&self->gl_context);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_gl_renderer_resize_viewport (GskGLRenderer *self,
|
||||
const graphene_rect_t *viewport)
|
||||
{
|
||||
const int width = ceilf (viewport->size.width);
|
||||
const int height = ceilf (viewport->size.height);
|
||||
|
||||
GSK_RENDERER_NOTE (GSK_RENDERER (self), OPENGL, g_message ("glViewport(0, 0, %d, %d) [scale:%d]",
|
||||
width,
|
||||
height,
|
||||
self->scale_factor));
|
||||
|
||||
glViewport (0, 0, width, height);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
gsk_gl_renderer_clear_tree (GskGLRenderer *self)
|
||||
{
|
||||
@ -2561,7 +2544,7 @@ gsk_gl_renderer_do_render (GskRenderer *renderer,
|
||||
gsk_profiler_timer_begin (profiler, self->profile_timers.cpu_time);
|
||||
#endif
|
||||
|
||||
gsk_gl_renderer_resize_viewport (self, viewport);
|
||||
glViewport (0, 0, ceilf (viewport->size.width), ceilf (viewport->size.height));
|
||||
gsk_gl_renderer_setup_render_mode (self);
|
||||
gsk_gl_renderer_clear (self);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user