summaryrefslogtreecommitdiffstats
path: root/libs/hwui/ProgramCache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use high precision iterators on specific GPUsRomain Guy2011-08-011-9/+19
| | | | | | Bug #5098359 Change-Id: I52ee8c7b4c9e8d4c7bedb684eaf7bef6c44c74b9
* Merge "Allows to render with an OpenGL context inside a TextureView."Romain Guy2011-05-021-7/+5
|\
| * Allows to render with an OpenGL context inside a TextureView.Romain Guy2011-05-021-7/+5
| | | | | | | | Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
* | Line endcaps for AA lines are now antialiased.Chet Haase2011-05-021-27/+36
|/ | | | | | Also fixed other minor issues with AA and line rendering. Change-Id: Icd4638d27c70e2ee0f28b5d9a2b97d8b29e8ac4d
* New widget: TextureViewRomain Guy2011-04-281-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #4343984 TextureView can be used to render media content (video, OpenGL, RenderScript) inside a View. The key difference with SurfaceView is that TextureView does not create a new Surface. This gives the ability to seamlessly transform, animate, fade, etc. a TextureView, which was hard if not impossible to do with a SurfaceView. A TextureView also interacts perfectly with ScrollView, ListView, etc. It allows application to embed media content in a much more flexible way than before. For instance, to render the camera preview at 50% opacity, all you need to do is the following: mTextureView.setAlpha(0.5f); Camera c = Camera.open(); c.setPreviewTexture(mTextureView.getSurfaceTexture()); c.startPreview(); TextureView uses a SurfaceTexture to get the job done. More APIs are required to make it easy to create OpenGL contexts for a TextureView. It can currently be done with a bit of JNI code. Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
* Apply shaders/filters to text drop shadows.Romain Guy2011-04-261-0/+9
| | | | | | | | | Bug #4318323 This change also fixes the fact that shaders were not modulated by the paint's color when drawing paths. Change-Id: Id88804143aea06c895d4cbcdbe106d660230aa5a
* Enable anti-aliasing for hw-accelerated linesChet Haase2011-04-211-2/+36
| | | | | | | Draw anti-aliased lines with OpenGL by constructing a quad with a border that fades out (to mimic fragment coverage). Change-Id: Ib81a3e62d663acdf1b46b401ac4aa7ee9855cc7e
* Fix shaders generation on IMG GPUs.Romain Guy2011-03-231-2/+2
| | | | Change-Id: Id15df2663e41e31f04c8d86b958312341da8101d
* Add support for drawPoint() and drawPoints().Romain Guy2011-03-211-4/+38
| | | | Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
* Correctly release the OpenGL Canvas on EGL error.Romain Guy2010-12-071-0/+2
| | | | Change-Id: Ib31fd8445f7ce5f7aa7e0205de0e7db80d024fc2
* Move all debug flags in a single place.Romain Guy2010-11-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This change also adds a new memory usage flag. When turned on, the following is printed after every frame: D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes): D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520 D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608 D/OpenGLRenderer( 3723): GradientCache 135168 / 524288 D/OpenGLRenderer( 3723): PathCache 41180 / 4194304 D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152 D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144 D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144 D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144 D/OpenGLRenderer( 3723): Other: D/OpenGLRenderer( 3723): FboCache 2 / 12 D/OpenGLRenderer( 3723): PatchCache 31 / 512 D/OpenGLRenderer( 3723): Total memory usage: D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB This should help tracking possibe memory issues. Change-Id: I83f483ca1d2dbef904829bce368e33fe5503e8d6
* Color filters were ignored by the program cache fast path.Romain Guy2010-10-131-1/+1
| | | | Change-Id: I08f2f02d356234a674be778d088e0558fd49c849
* Simplify black texture fragment shader.Romain Guy2010-10-121-2/+2
| | | | Change-Id: If2d43f92f4c98ec128692761a670b0f31207a3c0
* Optimize GLSL shaders.Romain Guy2010-10-111-21/+150
| | | | Change-Id: I9a5e01bced63d8da0c61330a543a2b805388a59d
* Improve performance of linear gradients.Romain Guy2010-10-111-3/+3
| | | | Change-Id: If1caee31fc045dea13a4c5c10f25f2ffd325c4f8
* Add 3D transforms support to all gradients.Romain Guy2010-10-071-10/+3
| | | | Change-Id: I61409edd00dab3a11684a3f5e4f7df0afc734758
* Apply 3D transformations to gradient shaders.Romain Guy2010-10-061-5/+1
| | | | | | | This fixes only linear gradients. Sweep and radial gradients, as well as bitmap shaders, will be fixed in a future commit. Change-Id: I4eee4ff62e9bbf3b9339fc111a780167449ecfef
* Add support for circular gradients to the GL renderer.Romain Guy2010-09-211-5/+11
| | | | | | | This change also adds full support for local transformation matrices on sweep and radial gradients. Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
* Add support for SweepGradient in the GL renderer.Romain Guy2010-09-201-17/+50
| | | | Change-Id: I7aa397ed4e34655ead9ba1f5b4ce087665e0f022
* Correct implementation of saveLayer().Romain Guy2010-09-121-1/+4
| | | | Change-Id: I5375126636913e0a84f2d6bbd0ebe40d2e4f2763
* Add support for advanced blend modes with the framebuffer.Romain Guy2010-09-091-2/+20
| | | | | | | This adds the ability to blend with the framebuffer using Darken, Lighten, Add, Multiply, Overlay and Screen. Change-Id: Iae01a53797d4ad39c373cba6ff2a42293129da1a
* Add extra blending modes.Romain Guy2010-08-101-7/+24
| | | | | | | | | | | | This change adds the following blending modes for shaders and color filters: Add Multiply Screen Overlay Darken Lighten Change-Id: Iff22f5ce6041b43c71b1857d73013f5010ab3413
* Fix tons of bugs and add new text rendering support.Romain Guy2010-08-101-0/+6
| | | | Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
* Add support for paths.Romain Guy2010-08-051-1/+1
| | | | | | | Rendering is implementing by rasterizing the paths into A8 textures. This cna be extremely inefficient if the path changes often. Change-Id: I609343f304ae38e0d319359403ee73b9b5b3c93a
* Add support for ColorFilters.Romain Guy2010-08-021-9/+28
| | | | | | Color filters are fully supported and can be used with shaders. Change-Id: Id90ccf1c81cb462f2431f366f3f8f710d7971e04
* Refactor Skia shaders handling.Romain Guy2010-07-301-9/+9
| | | | | | | | With this change, Skia shaders can easily be applied to any mesh. This change also supports ComposeShader. For instance, this can be used to blend a gradient and a bitmap togehter and paint a string of text with the result. Change-Id: I701c2f9cf7f89b2ff58005e8a1d0d80ccf4a4aea
* Moved all the rendering code to the new shader generator.Romain Guy2010-07-291-2/+65
| | | | | | | | | | | The generator supports features that are not yet implement in the renderer: color matrix, lighting, porterduff color blending and composite shaders. This change also adds support for repeated/mirrored non-power of 2 bitmap shaders. Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234
* Generate shaders to cover all possible cases.Romain Guy2010-07-271-0/+332
With this change, all the vertex and fragment shaders used by the GL renderer are now generated based on a program description supplied by the caller. This allows the renderer to generate a large number of shaders without having to write all the possible combinations by hand. The generated shaders are stored in a program cache. Change-Id: If54d286e77ae021c724d42090da476df12a18ebb