{"id":21343141,"url":"https://github.com/desmond1121/fresco-source-analysis","last_synced_at":"2026-01-27T11:04:59.612Z","repository":{"id":36673032,"uuid":"40979422","full_name":"desmond1121/Fresco-Source-Analysis","owner":"desmond1121","description":"中文的Fresco源码解读","archived":false,"fork":false,"pushed_at":"2018-03-18T03:14:48.000Z","size":162,"stargazers_count":862,"open_issues_count":8,"forks_count":127,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-03-16T03:13:00.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desmond1121.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-18T15:17:16.000Z","updated_at":"2025-02-21T22:43:16.000Z","dependencies_parsed_at":"2022-09-06T11:41:38.205Z","dependency_job_id":null,"html_url":"https://github.com/desmond1121/Fresco-Source-Analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/desmond1121/Fresco-Source-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmond1121%2FFresco-Source-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmond1121%2FFresco-Source-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmond1121%2FFresco-Source-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmond1121%2FFresco-Source-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desmond1121","download_url":"https://codeload.github.com/desmond1121/Fresco-Source-Analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desmond1121%2FFresco-Source-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T01:12:10.466Z","updated_at":"2026-01-27T11:04:59.597Z","avatar_url":"https://github.com/desmond1121.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fresco-Source-Analysis\n中文的Fresco源码解读，分析版本：0.7.0。欢迎Issue讨论！\n\n## 导读\n\n\n本系列文章目的是分析源码，具体使用方法虽然会涉及，但不多。你应该在对Fresco的使用方法有一定了解之后再来阅读这些文章，推荐[Fresco中文文档](http://fresco-cn.org/docs/)来了解它的使用方法。\n\n### Fresco中几个基本设计模式\n\n在[Wiki-设计模式](https://github.com/desmond1121/Fresco-Source-Analysis/wiki/Fresco%E4%B8%AD%E7%9A%84%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F)中介绍了Fresco中用到的几个基本设计模式，供读者参考。\n\n### 初级分析：DraweeView显示图层树的过程\n\n这部分的内容针对使用者会接触到的几个部件：DraweeHierarchy、DraweeController、DraweeView、ImageRequest等，介绍这些组件的功能，分析它们之间的关系。具体参考以下章节：\n\n- [Fresco源码分析(1) - 图像层次与各类Drawable][1]\n- [Fresco源码分析(2) - GenericDraweeHierarchy构建图层][2]\n- [Fresco源码分析(3) - DraweeView显示图层树][3]\n\n### 进阶分析：图像请求与缓存\n\n这部分的内容从DataSource的功能出发，探索与分析Fresco底层缓存、加载数据的原理实现。具体参考以下章节：\n\n- [Fresco源码分析(4) - 异步加载数据][4]\n- [Fresco源码分析(5) - Producer流水线][5]\n- [Fresco源码分析(6) - 缓存][6]\n\n### 待完成\n\n- Fresco源码分析(7) - 解码\n\nFresco的解码能力是它的一大特色，它会根据不同平台放置解析完成的图片，根据不同的渠道（网络、本地）处理渐进式JPEG图。由于作者的能力与时间有限，在图像解码方面的知识储备不足，解码部分暂未完成，有能力的朋友可以联系我一起进行分析，谢谢！\n\n###总结\n\n作者总结了Fresco的架构图如下：\n\n![Fresco](http://blog.desmondyao.com/image/fresco/fresco.PNG)\n\n其中：\n\n- **表现层** 维持图片层次DraweeHierarchy并将其绘制到屏幕上；\n- **控制层** 提供缓存查找、图片获取及处理的接口，通过DraweeController来控制表现层的DraweeHierarchy，它是表现层与核心层之间的纽带；\n- **核心层** 负责各类缓存、解码、数据获取的逻辑，将数据通过Producer传达给控制层的Consumer。\n\n[1]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(1)%20-%20%E5%9B%BE%E5%83%8F%E5%B1%82%E6%AC%A1%E4%B8%8E%E5%90%84%E7%B1%BBDrawable.md\n[2]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(2)%20-%20GenericDraweeHierarchy%E6%9E%84%E5%BB%BA%E5%9B%BE%E5%B1%82.md\n[3]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(3)%20-%20DraweeView%E6%98%BE%E7%A4%BA%E5%9B%BE%E5%B1%82%E6%A0%91.md\n[3-3.2]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(3)%20-%20DraweeView%E6%98%BE%E7%A4%BA%E5%9B%BE%E5%B1%82%E6%A0%91.md#32-可关闭的引用\n[4]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(4)%20-%20%E5%BC%82%E6%AD%A5%E5%8A%A0%E8%BD%BD%E6%95%B0%E6%8D%AE.md\n[5]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(5)%20-%20Producer%E6%B5%81%E6%B0%B4%E7%BA%BF.md\n[6]: https://github.com/desmond1121/Fresco-Source-Analysis/blob/master/Fresco%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90(6)%20-%20%E7%BC%93%E5%AD%98.md\n\n如有错误，希望指正，谢谢！\n\nAuthored by Desmond\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesmond1121%2Ffresco-source-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesmond1121%2Ffresco-source-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesmond1121%2Ffresco-source-analysis/lists"}