{"action":"created","comment":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/38661042","id":38661042,"diff_hunk":"@@ -64,23 +64,27 @@ void Texture::setData(const GLuint* _data, unsigned int _dataSize) {\n     m_dirty = true;\n }\n \n-void Texture::setSubData(const GLuint* _subData, unsigned int _xoff, unsigned int _yoff, unsigned int _width,\n-                         unsigned int _height) {\n+void Texture::setSubData(const GLuint* _subData, unsigned int _xoff, unsigned int _yoff,\n+                         unsigned int _width, unsigned int _height) {\n \n-    std::unique_ptr<std::vector<GLuint>> subData(new std::vector<GLuint>(_subData, _subData + (_width * _height)));\n-\n-    // update m_data with subdata\n     size_t bpp = bytesPerPixel();\n     size_t divisor = sizeof(GLuint) / bpp;\n-    for (size_t j = 0; j < _height; j++) {\n-        size_t dpos = ((j + _yoff) * m_width + _xoff) / divisor;\n-        size_t spos = (j * _width) / divisor;\n-        std::memcpy(&m_data[dpos], &_subData[spos], _width * bpp);\n+\n+    // Init m_data if update() was not called after resize()\n+    if (m_data.size() != (m_width * m_height) / divisor) {\n+        m_data.resize((m_width * m_height) / divisor);","path":"core/src/gl/texture.cpp","position":21,"original_position":21,"commit_id":"995e037b2897e6c90641ca3d2ddf53a4cb628747","original_commit_id":"995e037b2897e6c90641ca3d2ddf53a4cb628747","user":{"login":"hjanetzek","id":1747,"avatar_url":"https://avatars.githubusercontent.com/u/1747?v=3","gravatar_id":"","url":"https://api.github.com/users/hjanetzek","html_url":"https://github.com/hjanetzek","followers_url":"https://api.github.com/users/hjanetzek/followers","following_url":"https://api.github.com/users/hjanetzek/following{/other_user}","gists_url":"https://api.github.com/users/hjanetzek/gists{/gist_id}","starred_url":"https://api.github.com/users/hjanetzek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjanetzek/subscriptions","organizations_url":"https://api.github.com/users/hjanetzek/orgs","repos_url":"https://api.github.com/users/hjanetzek/repos","events_url":"https://api.github.com/users/hjanetzek/events{/privacy}","received_events_url":"https://api.github.com/users/hjanetzek/received_events","type":"User","site_admin":false},"body":"the only necessary fix is the 'fix segv' commit or:\r\n\r\n````\r\n- std::unique_ptr<std::vector<GLuint>> subData(new std::vector<GLuint>(_subData, _subData + (_width * _height)));\r\n+ std::unique_ptr<std::vector<GLuint>> subData(new std::vector<GLuint>(_subData, _subData + (_width * _height)/divider));\r\n\r\n````","created_at":"2015-09-03T15:45:22Z","updated_at":"2015-09-03T15:45:22Z","html_url":"https://github.com/tangrams/tangram-es/pull/256#discussion_r38661042","pull_request_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/256","_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments/38661042"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/256#discussion_r38661042"},"pull_request":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/256"}}},"pull_request":{"url":"https://api.github.com/repos/tangrams/tangram-es/pulls/256","id":43201284,"html_url":"https://github.com/tangrams/tangram-es/pull/256","diff_url":"https://github.com/tangrams/tangram-es/pull/256.diff","patch_url":"https://github.com/tangrams/tangram-es/pull/256.patch","issue_url":"https://api.github.com/repos/tangrams/tangram-es/issues/256","number":256,"state":"open","locked":false,"title":"Text style refactor","user":{"login":"tallytalwar","id":360641,"avatar_url":"https://avatars.githubusercontent.com/u/360641?v=3","gravatar_id":"","url":"https://api.github.com/users/tallytalwar","html_url":"https://github.com/tallytalwar","followers_url":"https://api.github.com/users/tallytalwar/followers","following_url":"https://api.github.com/users/tallytalwar/following{/other_user}","gists_url":"https://api.github.com/users/tallytalwar/gists{/gist_id}","starred_url":"https://api.github.com/users/tallytalwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallytalwar/subscriptions","organizations_url":"https://api.github.com/users/tallytalwar/orgs","repos_url":"https://api.github.com/users/tallytalwar/repos","events_url":"https://api.github.com/users/tallytalwar/events{/privacy}","received_events_url":"https://api.github.com/users/tallytalwar/received_events","type":"User","site_admin":false},"body":"- Specifying font files in the style sheet to be used in the style sheet\r\n- TextStyle respects styling rules now.\r\n- Loading of font file from android systems path. (Future TODO for iOS, OSX, Linux).\r\n- color attribute for labels (to be parsed from styling rule). (thanks to @karimnaaji)\r\n- colored sprites (thanks to @karimnaaji)\r\n- add `captilized` option\r\n- add `visible` option\r\n- font units specified in `px`, `pt`, `em`, `%`, default to `px`\r\n\r\nTodos:\r\n\r\n- [x] add `font:style`, defaulting to `normal`, supported is `italic`\r\n- [x] rename `font:name` to `font:family`\r\n- [x] merge [font-units](https://github.com/tangrams/tangram-es/tree/font-units) to have `pt`, `em`, `px` conversions for font sizes\r\n- [x] parse android fonts.xml for font filename\r\n","created_at":"2015-08-24T17:43:39Z","updated_at":"2015-09-03T15:45:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd40c9579a2d28fc6771c9402605183fc108beea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/256/commits","review_comments_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/256/comments","review_comment_url":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/issues/256/comments","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/995e037b2897e6c90641ca3d2ddf53a4cb628747","head":{"label":"tangrams:deviceFonts-android","ref":"deviceFonts-android","sha":"995e037b2897e6c90641ca3d2ddf53a4cb628747","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-09-03T02:51:21Z","pushed_at":"2015-09-03T08:47:27Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":30319,"stargazers_count":62,"watchers_count":62,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":12,"forks":15,"open_issues":12,"watchers":62,"default_branch":"master"}},"base":{"label":"tangrams:master","ref":"master","sha":"43af16cc048cab9b444a4ccdb5ff353020f3df3e","user":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"repo":{"id":23391501,"name":"tangram-es","full_name":"tangrams/tangram-es","owner":{"login":"tangrams","id":8495302,"avatar_url":"https://avatars.githubusercontent.com/u/8495302?v=3","gravatar_id":"","url":"https://api.github.com/users/tangrams","html_url":"https://github.com/tangrams","followers_url":"https://api.github.com/users/tangrams/followers","following_url":"https://api.github.com/users/tangrams/following{/other_user}","gists_url":"https://api.github.com/users/tangrams/gists{/gist_id}","starred_url":"https://api.github.com/users/tangrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangrams/subscriptions","organizations_url":"https://api.github.com/users/tangrams/orgs","repos_url":"https://api.github.com/users/tangrams/repos","events_url":"https://api.github.com/users/tangrams/events{/privacy}","received_events_url":"https://api.github.com/users/tangrams/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tangrams/tangram-es","description":"2D and 3D map renderer using OpenGL ES","fork":false,"url":"https://api.github.com/repos/tangrams/tangram-es","forks_url":"https://api.github.com/repos/tangrams/tangram-es/forks","keys_url":"https://api.github.com/repos/tangrams/tangram-es/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tangrams/tangram-es/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tangrams/tangram-es/teams","hooks_url":"https://api.github.com/repos/tangrams/tangram-es/hooks","issue_events_url":"https://api.github.com/repos/tangrams/tangram-es/issues/events{/number}","events_url":"https://api.github.com/repos/tangrams/tangram-es/events","assignees_url":"https://api.github.com/repos/tangrams/tangram-es/assignees{/user}","branches_url":"https://api.github.com/repos/tangrams/tangram-es/branches{/branch}","tags_url":"https://api.github.com/repos/tangrams/tangram-es/tags","blobs_url":"https://api.github.com/repos/tangrams/tangram-es/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tangrams/tangram-es/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tangrams/tangram-es/git/refs{/sha}","trees_url":"https://api.github.com/repos/tangrams/tangram-es/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tangrams/tangram-es/statuses/{sha}","languages_url":"https://api.github.com/repos/tangrams/tangram-es/languages","stargazers_url":"https://api.github.com/repos/tangrams/tangram-es/stargazers","contributors_url":"https://api.github.com/repos/tangrams/tangram-es/contributors","subscribers_url":"https://api.github.com/repos/tangrams/tangram-es/subscribers","subscription_url":"https://api.github.com/repos/tangrams/tangram-es/subscription","commits_url":"https://api.github.com/repos/tangrams/tangram-es/commits{/sha}","git_commits_url":"https://api.github.com/repos/tangrams/tangram-es/git/commits{/sha}","comments_url":"https://api.github.com/repos/tangrams/tangram-es/comments{/number}","issue_comment_url":"https://api.github.com/repos/tangrams/tangram-es/issues/comments{/number}","contents_url":"https://api.github.com/repos/tangrams/tangram-es/contents/{+path}","compare_url":"https://api.github.com/repos/tangrams/tangram-es/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tangrams/tangram-es/merges","archive_url":"https://api.github.com/repos/tangrams/tangram-es/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tangrams/tangram-es/downloads","issues_url":"https://api.github.com/repos/tangrams/tangram-es/issues{/number}","pulls_url":"https://api.github.com/repos/tangrams/tangram-es/pulls{/number}","milestones_url":"https://api.github.com/repos/tangrams/tangram-es/milestones{/number}","notifications_url":"https://api.github.com/repos/tangrams/tangram-es/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tangrams/tangram-es/labels{/name}","releases_url":"https://api.github.com/repos/tangrams/tangram-es/releases{/id}","created_at":"2014-08-27T13:56:56Z","updated_at":"2015-09-03T02:51:21Z","pushed_at":"2015-09-03T08:47:27Z","git_url":"git://github.com/tangrams/tangram-es.git","ssh_url":"git@github.com:tangrams/tangram-es.git","clone_url":"https://github.com/tangrams/tangram-es.git","svn_url":"https://github.com/tangrams/tangram-es","homepage":"","size":30319,"stargazers_count":62,"watchers_count":62,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":12,"forks":15,"open_issues":12,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/256"},"html":{"href":"https://github.com/tangrams/tangram-es/pull/256"},"issue":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/256"},"comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tangrams/tangram-es/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/tangrams/tangram-es/statuses/995e037b2897e6c90641ca3d2ddf53a4cb628747"}}}}