{"id":51,"date":"2023-08-12T00:05:29","date_gmt":"2023-08-12T00:05:29","guid":{"rendered":"https:\/\/blogs.scummvm.org\/eklipsed\/?p=51"},"modified":"2023-08-12T00:05:29","modified_gmt":"2023-08-12T00:05:29","slug":"optimizing-graphicsmanagedsurface-transparentsurface","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/eklipsed\/2023\/08\/12\/optimizing-graphicsmanagedsurface-transparentsurface\/","title":{"rendered":"Optimizing Graphics::ManagedSurface\/TransparentSurface"},"content":{"rendered":"<p>Last post I talked about how we wanted to continue with what I was doing for the AGS blending code and apply it to the TransparentSurface code (and then eventually move that functionality into ManagedSurface). Well, it seems like I&#8217;ve done it! Here&#8217;s an overview of what I did: First I didn&#8217;t optimize anything but started by refactoring the code and making a ManagedSurface version of TransparentSurfaces&#8217;s blit function. Only after I refactored everything to a standard that I thought was pretty good, I started to optimize. After that, I did another round of refactoring and listening to my mentor&#8217;s critiques of my code and made the code as clean and fast as I could get it. Not much to show here, everything looks the same as it did before (hopefully lol), but there was a cool bug where sprites were about twice the size they should be, but I didn&#8217;t get a picture of it. Anyways, this might be my second or third to last blog post, so its getting to the end here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last post I talked about how we wanted to continue with what I was doing for the AGS blending code and apply it to the TransparentSurface code (and then eventually move that functionality into ManagedSurface). Well, it seems like I&#8217;ve done it! Here&#8217;s an overview of what I did: First I didn&#8217;t optimize anything but [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/51\/revisions\/52"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}