{"action":"created","comment":{"url":"https://api.github.com/repos/ppy/osu-framework/pulls/comments/180322336","pull_request_review_id":110722022,"id":180322336,"diff_hunk":"@@ -0,0 +1,33 @@\n+﻿// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.\r\n+// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE\r\n+\r\n+using System;\r\n+using System.Drawing;\r\n+using PixelFormat = OpenTK.Graphics.ES30.PixelFormat;\r\n+\r\n+namespace osu.Framework.Graphics.Textures\r\n+{\r\n+    public class RawTextureBytes : IRawTexture\r\n+    {\r\n+        private readonly byte[] bytes;\r\n+        private readonly Rectangle dimensions;\r\n+\r\n+        public PixelFormat PixelFormat => PixelFormat.Rgba;\r\n+\r\n+        public ITextureLocker ObtainLock() => new TextureLockerByteArray(bytes);\r\n+\r\n+        public int Width => dimensions.Width;\r\n+        public int Height => dimensions.Height;\r\n+\r\n+        public RawTextureBytes(byte[] bytes, Rectangle dimensions)\r\n+        {\r\n+            this.bytes = bytes;\r\n+            this.dimensions = dimensions;\r\n+        }\r\n+\r\n+        public void Dispose()\r\n+        {\r\n+            throw new NotImplementedException();\r","path":"osu.Framework/Graphics/Textures/RawTextureBytes.cs","position":30,"original_position":30,"commit_id":"2c47d87e8a41b3c50b96188467d9dbe32b13d77a","original_commit_id":"2c47d87e8a41b3c50b96188467d9dbe32b13d77a","user":{"login":"Tom94","id":4923655,"avatar_url":"https://avatars3.githubusercontent.com/u/4923655?v=4","gravatar_id":"","url":"https://api.github.com/users/Tom94","html_url":"https://github.com/Tom94","followers_url":"https://api.github.com/users/Tom94/followers","following_url":"https://api.github.com/users/Tom94/following{/other_user}","gists_url":"https://api.github.com/users/Tom94/gists{/gist_id}","starred_url":"https://api.github.com/users/Tom94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tom94/subscriptions","organizations_url":"https://api.github.com/users/Tom94/orgs","repos_url":"https://api.github.com/users/Tom94/repos","events_url":"https://api.github.com/users/Tom94/events{/privacy}","received_events_url":"https://api.github.com/users/Tom94/received_events","type":"User","site_admin":false},"body":"I initially thought the same, but I believe you are mistaken. `Dispose` is not implementing `IDisposable`; it simply marks manual disposal as a non-implemented feature.","created_at":"2018-04-10T07:39:19Z","updated_at":"2018-04-10T07:39:20Z","html_url":"https://github.com/ppy/osu-framework/pull/1481#discussion_r180322336","pull_request_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1481","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/comments/180322336"},"html":{"href":"https://github.com/ppy/osu-framework/pull/1481#discussion_r180322336"},"pull_request":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1481"}},"in_reply_to_id":179987869},"pull_request":{"url":"https://api.github.com/repos/ppy/osu-framework/pulls/1481","id":177085500,"html_url":"https://github.com/ppy/osu-framework/pull/1481","diff_url":"https://github.com/ppy/osu-framework/pull/1481.diff","patch_url":"https://github.com/ppy/osu-framework/pull/1481.patch","issue_url":"https://api.github.com/repos/ppy/osu-framework/issues/1481","number":1481,"state":"open","locked":false,"title":"Reduce memory usage by texture loading significantly","user":{"login":"peppy","id":191335,"avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"body":"Has potential for further improvements in glyph loading.\r\n\r\nosu! drops from 800 to 500mb usage.\r\n\r\n- `BufferStack` was never being used (but allocating .\r\n- `BufferStack`, even if implemented in the correct place, was only solving half the problem as Bitmap allocates full data anyway. now we abuse this fact and read directly from the `Bitmap`'s data.","created_at":"2018-03-23T14:26:46Z","updated_at":"2018-04-10T07:39:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04d8040e5a9c1f6c48f7eb9d6475dc9ff017552e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":431280010,"url":"https://api.github.com/repos/ppy/osu-framework/labels/code%20quality","name":"code quality","color":"84b6eb","default":false},{"id":459722628,"url":"https://api.github.com/repos/ppy/osu-framework/labels/performance","name":"performance","color":"e25a61","default":false}],"milestone":{"url":"https://api.github.com/repos/ppy/osu-framework/milestones/11","html_url":"https://github.com/ppy/osu-framework/milestone/11","labels_url":"https://api.github.com/repos/ppy/osu-framework/milestones/11/labels","id":3205636,"number":11,"title":"April 2018","description":"","creator":{"login":"peppy","id":191335,"avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":8,"state":"open","created_at":"2018-03-21T08:07:28Z","updated_at":"2018-04-09T08:29:38Z","due_on":"2018-04-30T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1481/commits","review_comments_url":"https://api.github.com/repos/ppy/osu-framework/pulls/1481/comments","review_comment_url":"https://api.github.com/repos/ppy/osu-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ppy/osu-framework/issues/1481/comments","statuses_url":"https://api.github.com/repos/ppy/osu-framework/statuses/2c47d87e8a41b3c50b96188467d9dbe32b13d77a","head":{"label":"peppy:fix-memory-usage","ref":"fix-memory-usage","sha":"2c47d87e8a41b3c50b96188467d9dbe32b13d77a","user":{"login":"peppy","id":191335,"avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"repo":{"id":66810604,"name":"osu-framework","full_name":"peppy/osu-framework","owner":{"login":"peppy","id":191335,"avatar_url":"https://avatars3.githubusercontent.com/u/191335?v=4","gravatar_id":"","url":"https://api.github.com/users/peppy","html_url":"https://github.com/peppy","followers_url":"https://api.github.com/users/peppy/followers","following_url":"https://api.github.com/users/peppy/following{/other_user}","gists_url":"https://api.github.com/users/peppy/gists{/gist_id}","starred_url":"https://api.github.com/users/peppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peppy/subscriptions","organizations_url":"https://api.github.com/users/peppy/orgs","repos_url":"https://api.github.com/users/peppy/repos","events_url":"https://api.github.com/users/peppy/events{/privacy}","received_events_url":"https://api.github.com/users/peppy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peppy/osu-framework","description":"A game framework written with osu! in mind.","fork":true,"url":"https://api.github.com/repos/peppy/osu-framework","forks_url":"https://api.github.com/repos/peppy/osu-framework/forks","keys_url":"https://api.github.com/repos/peppy/osu-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peppy/osu-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peppy/osu-framework/teams","hooks_url":"https://api.github.com/repos/peppy/osu-framework/hooks","issue_events_url":"https://api.github.com/repos/peppy/osu-framework/issues/events{/number}","events_url":"https://api.github.com/repos/peppy/osu-framework/events","assignees_url":"https://api.github.com/repos/peppy/osu-framework/assignees{/user}","branches_url":"https://api.github.com/repos/peppy/osu-framework/branches{/branch}","tags_url":"https://api.github.com/repos/peppy/osu-framework/tags","blobs_url":"https://api.github.com/repos/peppy/osu-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peppy/osu-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peppy/osu-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/peppy/osu-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peppy/osu-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/peppy/osu-framework/languages","stargazers_url":"https://api.github.com/repos/peppy/osu-framework/stargazers","contributors_url":"https://api.github.com/repos/peppy/osu-framework/contributors","subscribers_url":"https://api.github.com/repos/peppy/osu-framework/subscribers","subscription_url":"https://api.github.com/repos/peppy/osu-framework/subscription","commits_url":"https://api.github.com/repos/peppy/osu-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/peppy/osu-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/peppy/osu-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/peppy/osu-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/peppy/osu-framework/contents/{+path}","compare_url":"https://api.github.com/repos/peppy/osu-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peppy/osu-framework/merges","archive_url":"https://api.github.com/repos/peppy/osu-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peppy/osu-framework/downloads","issues_url":"https://api.github.com/repos/peppy/osu-framework/issues{/number}","pulls_url":"https://api.github.com/repos/peppy/osu-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/peppy/osu-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/peppy/osu-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peppy/osu-framework/labels{/name}","releases_url":"https://api.github.com/repos/peppy/osu-framework/releases{/id}","deployments_url":"https://api.github.com/repos/peppy/osu-framework/deployments","created_at":"2016-08-29T04:12:29Z","updated_at":"2018-02-21T09:45:57Z","pushed_at":"2018-04-09T10:03:21Z","git_url":"git://github.com/peppy/osu-framework.git","ssh_url":"git@github.com:peppy/osu-framework.git","clone_url":"https://github.com/peppy/osu-framework.git","svn_url":"https://github.com/peppy/osu-framework","homepage":"","size":24287,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"ppy:master","ref":"master","sha":"6f723e071e4729438c406d404841d132bc2e1601","user":{"login":"ppy","id":995763,"avatar_url":"https://avatars1.githubusercontent.com/u/995763?v=4","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"repo":{"id":66614524,"name":"osu-framework","full_name":"ppy/osu-framework","owner":{"login":"ppy","id":995763,"avatar_url":"https://avatars1.githubusercontent.com/u/995763?v=4","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ppy/osu-framework","description":"A game framework written with osu! in mind.","fork":false,"url":"https://api.github.com/repos/ppy/osu-framework","forks_url":"https://api.github.com/repos/ppy/osu-framework/forks","keys_url":"https://api.github.com/repos/ppy/osu-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppy/osu-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppy/osu-framework/teams","hooks_url":"https://api.github.com/repos/ppy/osu-framework/hooks","issue_events_url":"https://api.github.com/repos/ppy/osu-framework/issues/events{/number}","events_url":"https://api.github.com/repos/ppy/osu-framework/events","assignees_url":"https://api.github.com/repos/ppy/osu-framework/assignees{/user}","branches_url":"https://api.github.com/repos/ppy/osu-framework/branches{/branch}","tags_url":"https://api.github.com/repos/ppy/osu-framework/tags","blobs_url":"https://api.github.com/repos/ppy/osu-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppy/osu-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppy/osu-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppy/osu-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppy/osu-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/ppy/osu-framework/languages","stargazers_url":"https://api.github.com/repos/ppy/osu-framework/stargazers","contributors_url":"https://api.github.com/repos/ppy/osu-framework/contributors","subscribers_url":"https://api.github.com/repos/ppy/osu-framework/subscribers","subscription_url":"https://api.github.com/repos/ppy/osu-framework/subscription","commits_url":"https://api.github.com/repos/ppy/osu-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppy/osu-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppy/osu-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppy/osu-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppy/osu-framework/contents/{+path}","compare_url":"https://api.github.com/repos/ppy/osu-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppy/osu-framework/merges","archive_url":"https://api.github.com/repos/ppy/osu-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppy/osu-framework/downloads","issues_url":"https://api.github.com/repos/ppy/osu-framework/issues{/number}","pulls_url":"https://api.github.com/repos/ppy/osu-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/ppy/osu-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/ppy/osu-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppy/osu-framework/labels{/name}","releases_url":"https://api.github.com/repos/ppy/osu-framework/releases{/id}","deployments_url":"https://api.github.com/repos/ppy/osu-framework/deployments","created_at":"2016-08-26T03:45:35Z","updated_at":"2018-04-09T08:25:49Z","pushed_at":"2018-04-09T10:03:22Z","git_url":"git://github.com/ppy/osu-framework.git","ssh_url":"git@github.com:ppy/osu-framework.git","clone_url":"https://github.com/ppy/osu-framework.git","svn_url":"https://github.com/ppy/osu-framework","homepage":"","size":26358,"stargazers_count":221,"watchers_count":221,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"archived":false,"open_issues_count":71,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":120,"open_issues":71,"watchers":221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1481"},"html":{"href":"https://github.com/ppy/osu-framework/pull/1481"},"issue":{"href":"https://api.github.com/repos/ppy/osu-framework/issues/1481"},"comments":{"href":"https://api.github.com/repos/ppy/osu-framework/issues/1481/comments"},"review_comments":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1481/comments"},"review_comment":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ppy/osu-framework/pulls/1481/commits"},"statuses":{"href":"https://api.github.com/repos/ppy/osu-framework/statuses/2c47d87e8a41b3c50b96188467d9dbe32b13d77a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Tom94"}}