Git Product home page Git Product logo

fresco-source-analysis's Introduction

#Fresco-Source-Analysis 中文的Fresco源码解读,分析版本:0.7.0。欢迎Issue讨论!

导读

本系列文章目的是分析源码,具体使用方法虽然会涉及,但不多。你应该在对Fresco的使用方法有一定了解之后再来阅读这些文章,推荐Fresco中文文档来了解它的使用方法。

Fresco中几个基本设计模式

Wiki-设计模式中介绍了Fresco中用到的几个基本设计模式,供读者参考。

初级分析:DraweeView显示图层树的过程

这部分的内容针对使用者会接触到的几个部件:DraweeHierarchy、DraweeController、DraweeView、ImageRequest等,介绍这些组件的功能,分析它们之间的关系。具体参考以下章节:

进阶分析:图像请求与缓存

这部分的内容从DataSource的功能出发,探索与分析Fresco底层缓存、加载数据的原理实现。具体参考以下章节:

待完成

  • Fresco源码分析(7) - 解码

Fresco的解码能力是它的一大特色,它会根据不同平台放置解析完成的图片,根据不同的渠道(网络、本地)处理渐进式JPEG图。由于作者的能力与时间有限,在图像解码方面的知识储备不足,解码部分暂未完成,有能力的朋友可以联系我一起进行分析,谢谢!

###总结

作者总结了Fresco的架构图如下:

Fresco

其中:

  • 表现层 维持图片层次DraweeHierarchy并将其绘制到屏幕上;
  • 控制层 提供缓存查找、图片获取及处理的接口,通过DraweeController来控制表现层的DraweeHierarchy,它是表现层与核心层之间的纽带;
  • 核心层 负责各类缓存、解码、数据获取的逻辑,将数据通过Producer传达给控制层的Consumer。

如有错误,希望指正,谢谢!

Authored by Desmond

fresco-source-analysis's People

Contributors

desmond1121 avatar

Watchers

James Cloos avatar dingdj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.