[mutter/wip/carlosg/away-with-swizzling: 4/4] Revert "Revert "cogl: Pick glReadPixels format by target, not source""



commit 12756af2d6e6abe2e2497567ead8b4c787615228
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 7 22:27:58 2019 +0100

    Revert "Revert "cogl: Pick glReadPixels format by target, not source""
    
    This reverts commit 4f72099023bc5bb142a782a1924797729329cc9a.

 cogl/cogl/driver/gl/cogl-framebuffer-gl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
index bd5ab5183..8f5a1590d 100644
--- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -4,6 +4,7 @@
  * A Low Level GPU Graphics and Utilities API
  *
  * Copyright (C) 2007,2008,2009,2012 Intel Corporation.
+ * Copyright (C) 2018 DisplayLink (UK) Ltd.
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -1274,7 +1275,7 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
     y = framebuffer_height - y - height;
 
   required_format = ctx->driver_vtable->pixel_format_to_gl (ctx,
-                                                           framebuffer->internal_format,
+                                                           format,
                                                            &gl_intformat,
                                                            &gl_format,
                                                            &gl_type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]