Skip to content

Commit

Permalink
[fix] ffi/framebuffer_android: separate invert blitbuffer (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenzie committed Mar 26, 2018
1 parent 8058007 commit 7cb11c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ffi/framebuffer_android.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local framebuffer = {}
function framebuffer:init()
-- we present this buffer to the outside
self.bb = BB.new(android.screen.width, android.screen.height, BB.TYPE_BBRGB32)
self.invert_bb = BB.new(android.screen.width, android.screen.height, BB.TYPE_BBRGB32)
-- TODO: should we better use these?
-- android.lib.ANativeWindow_getWidth(window)
-- android.lib.ANativeWindow_getHeight(window)
Expand Down Expand Up @@ -47,7 +48,8 @@ function framebuffer:refreshFullImp()
bb:setRotation(ext_bb:getRotation())

if ext_bb:getInverse() == 1 then
bb:invertblitFrom(ext_bb)
self.invert_bb:invertblitFrom(ext_bb)
bb:blitFrom(self.invert_bb)
else
bb:blitFrom(ext_bb)
end
Expand Down

0 comments on commit 7cb11c4

Please sign in to comment.